Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // OperationString array for Operation type OperationString = []string{"ADD", "UPDATE", "REMOVE", "SYNCED"} )
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
Broadcaster holds the details of registered listeners
func NewBroadcaster ¶
func NewBroadcaster() *Broadcaster
NewBroadcaster returns an instance of Broadcaster object
func (*Broadcaster) Add ¶
func (b *Broadcaster) Add(listener Listener)
Add lets to register a listener
func (*Broadcaster) Notify ¶
func (b *Broadcaster) Notify(instance interface{})
Notify notifies an update to registered listeners
type Listener ¶
type Listener interface {
OnUpdate(instance interface{})
}
Listener interface for K8S resource
type ListenerFunc ¶
type ListenerFunc func(instance interface{})
ListenerFunc is callback of listener
func (ListenerFunc) OnUpdate ¶
func (f ListenerFunc) OnUpdate(instance interface{})
OnUpdate callback
type PodUpdatesHandler ¶
type PodUpdatesHandler interface {
OnPodUpdate(podUpdate *PodUpdate)
}
PodUpdatesHandler interface
type PodWatcher ¶
type PodWatcher struct {
// contains filtered or unexported fields
}
PodWatcher struct
func StartPodWatcher ¶
func StartPodWatcher(clientset kubernetes.Interface, resyncPeriod time.Duration, stopCh <-chan struct{}) (*PodWatcher, error)
StartPodWatcher start watching updates for pods from Kuberentes API server
func (*PodWatcher) HasSynced ¶
func (pw *PodWatcher) HasSynced() bool
HasSynced return true if podController.HasSynced()
func (*PodWatcher) ListBySelector ¶
ListBySelector for list pods with labels
func (*PodWatcher) RegisterHandler ¶
func (pw *PodWatcher) RegisterHandler(handler PodUpdatesHandler)
RegisterHandler for register pod update interface
type ServiceUpdate ¶
ServiceUpdate struct
type ServiceUpdatesHandler ¶
type ServiceUpdatesHandler interface {
OnServiceUpdate(serviceUpdate *ServiceUpdate)
}
ServiceUpdatesHandler interface
type ServiceWatcher ¶
type ServiceWatcher struct {
// contains filtered or unexported fields
}
ServiceWatcher struct
func StartServiceWatcher ¶
func StartServiceWatcher(clientset kubernetes.Interface, resyncPeriod time.Duration, stopCh <-chan struct{}) (*ServiceWatcher, error)
StartServiceWatcher start watching updates for services from Kuberentes API server
func (*ServiceWatcher) HasSynced ¶
func (svcw *ServiceWatcher) HasSynced() bool
HasSynced return true if serviceController.HasSynced()
func (*ServiceWatcher) ListBySelector ¶
ListBySelector for list services with labels
func (*ServiceWatcher) RegisterHandler ¶
func (svcw *ServiceWatcher) RegisterHandler(handler ServiceUpdatesHandler)
RegisterHandler for register service update interface