Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageType ¶
type StorageType int
StorageType defines what storage should be used as a cache for the watcher.
const ( // SimpleStorage storage type indicates thread-safe map as backing storage. SimpleStorage StorageType = iota // TTLStorage storage type indicates storage with expiration. When this // type of storage is used, TTL should be specified. TTLStorage )
type Watcher ¶
type Watcher interface {
Run(stopCh <-chan struct{})
}
Watcher is an interface of the generic proactive API watcher.
func NewWatcher ¶
func NewWatcher(config *WatcherConfig) Watcher
NewWatcher creates a new Kubernetes API watcher using provided configuration.
type WatcherConfig ¶
type WatcherConfig struct { ListerWatcher cache.ListerWatcher ExpectedType interface{} StoreConfig *WatcherStoreConfig ResyncPeriod time.Duration }
WatcherConfig represents the configuration of the Kubernetes API watcher.
type WatcherStoreConfig ¶
type WatcherStoreConfig struct { KeyFunc cache.KeyFunc Handler cache.ResourceEventHandler StorageType StorageType StorageTTL time.Duration }
WatcherStoreConfig represents the configuration of the storage backing the watcher.
Click to show internal directories.
Click to hide internal directories.