kubernetes/staging/src/k8s.io/client-go/tools/cache/shared_informer.go

type SharedInformer

type ResourceEventHandlerRegistration

type SharedIndexInformer

// NewSharedInformer creates a new instance for the ListerWatcher. See NewSharedIndexInformerWithOptions for full details.
func NewSharedInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration) SharedInformer {}

// NewSharedIndexInformer creates a new instance for the ListerWatcher and specified Indexers. See
// NewSharedIndexInformerWithOptions for full details.
func NewSharedIndexInformer(lw ListerWatcher, exampleObject runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer {}

// NewSharedIndexInformerWithOptions creates a new instance for the ListerWatcher.
// The created informer will not do resyncs if options.ResyncPeriod is zero.  Otherwise: for each
// handler that with a non-zero requested resync period, whether added
// before or after the informer starts, the nominal resync period is
// the requested resync period rounded up to a multiple of the
// informer's resync checking period.  Such an informer's resync
// checking period is established when the informer starts running,
// and is the maximum of (a) the minimum of the resync periods
// requested before the informer starts and the
// options.ResyncPeriod given here and (b) the constant
// `minimumResyncPeriod` defined in this file.
func NewSharedIndexInformerWithOptions(lw ListerWatcher, exampleObject runtime.Object, options SharedIndexInformerOptions) SharedIndexInformer {}

type SharedIndexInformerOptions

type InformerSynced

const syncedPollPeriod

const initialBufferSize

// WaitForNamedCacheSync is a wrapper around WaitForCacheSync that generates log messages
// indicating that the caller identified by name is waiting for syncs, followed by
// either a successful or failed sync.
func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}

// WaitForCacheSync waits for caches to populate.  It returns true if it was successful, false
// if the controller should shutdown
// callers should prefer WaitForNamedCacheSync()
func WaitForCacheSync(stopCh <-chan struct{}

type sharedIndexInformer

type dummyController

func (v *dummyController) Run(stopCh <-chan struct{}

func (v *dummyController) HasSynced() bool {}

func (v *dummyController) LastSyncResourceVersion() string {}

type updateNotification

type addNotification

type deleteNotification

func (s *sharedIndexInformer) SetWatchErrorHandler(handler WatchErrorHandler) error {}

func (s *sharedIndexInformer) SetTransform(handler TransformFunc) error {}

func (s *sharedIndexInformer) Run(stopCh <-chan struct{}

func (s *sharedIndexInformer) HasStarted() bool {}

func (s *sharedIndexInformer) HasSynced() bool {}

func (s *sharedIndexInformer) LastSyncResourceVersion() string {}

func (s *sharedIndexInformer) GetStore() Store {}

func (s *sharedIndexInformer) GetIndexer() Indexer {}

func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error {}

func (s *sharedIndexInformer) GetController() Controller {}

func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) (ResourceEventHandlerRegistration, error) {}

func determineResyncPeriod(desired, check time.Duration) time.Duration {}

const minimumResyncPeriod

func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) (ResourceEventHandlerRegistration, error) {}

func (s *sharedIndexInformer) HandleDeltas(obj interface{}

// Conforms to ResourceEventHandler
func (s *sharedIndexInformer) OnAdd(obj interface{}

// Conforms to ResourceEventHandler
func (s *sharedIndexInformer) OnUpdate(old, new interface{}

// Conforms to ResourceEventHandler
func (s *sharedIndexInformer) OnDelete(old interface{}

// IsStopped reports whether the informer has already been stopped
func (s *sharedIndexInformer) IsStopped() bool {}

func (s *sharedIndexInformer) RemoveEventHandler(handle ResourceEventHandlerRegistration) error {}

type sharedProcessor

func (p *sharedProcessor) getListener(registration ResourceEventHandlerRegistration) *processorListener {}

func (p *sharedProcessor) addListener(listener *processorListener) ResourceEventHandlerRegistration {}

func (p *sharedProcessor) removeListener(handle ResourceEventHandlerRegistration) error {}

func (p *sharedProcessor) distribute(obj interface{}

func (p *sharedProcessor) run(stopCh <-chan struct{}

// shouldResync queries every listener to determine if any of them need a resync, based on each
// listener's resyncPeriod.
func (p *sharedProcessor) shouldResync() bool {}

func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Duration) {}

type processorListener

// HasSynced returns true if the source informer has synced, and all
// corresponding events have been delivered.
func (p *processorListener) HasSynced() bool {}

func newProcessListener(handler ResourceEventHandler, requestedResyncPeriod, resyncPeriod time.Duration, now time.Time, bufferSize int, hasSynced func() bool) *processorListener {}

func (p *processorListener) add(notification interface{}

func (p *processorListener) pop() {}

func (p *processorListener) run() {}

// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0,
// this always returns false.
func (p *processorListener) shouldResync(now time.Time) bool {}

func (p *processorListener) determineNextResync(now time.Time) {}

func (p *processorListener) setResyncPeriod(resyncPeriod time.Duration) {}