watchers

package
v0.0.0-...-c1fcc63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL