add SharedInformer

This commit is contained in:
deads2k
2016-04-14 13:10:57 -04:00
parent 26c99fee00
commit 96d1f48b0b
2 changed files with 303 additions and 0 deletions

View File

@@ -68,6 +68,12 @@ type Controller struct {
reflectorMutex sync.RWMutex
}
// TODO make the "Controller" private, and convert all references to use ControllerInterface instead
type ControllerInterface interface {
Run(stopCh <-chan struct{})
HasSynced() bool
}
// New makes a new Controller from the given Config.
func New(c *Config) *Controller {
ctlr := &Controller{