Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventWatcher ¶
func NewEventWatcher(client kubernetes.Interface, config *EventWatcherConfig) watchers.Watcher
NewEventWatcher create a new watcher that only watches the events resource.
Types ¶
type EventHandler ¶
type EventHandler interface { OnAdd(*api_v1.Event) OnUpdate(*api_v1.Event, *api_v1.Event) OnDelete(*api_v1.Event) }
EventHandler interface provides a way to act upon signals from watcher that only watches the events resource.
type EventWatcherConfig ¶
type EventWatcherConfig struct { // Note, that this action will be executed on each List request, of which // there can be many, e.g. because of network problems. Note also, that // items in the List response WILL NOT trigger OnAdd method in handler, // instead Store contents will be completely replaced. OnList OnListFunc ResyncPeriod time.Duration Handler EventHandler }
EventWatcherConfig represents the configuration for the watcher that only watches the events resource.
type OnListFunc ¶
OnListFunc represent an action on the initial list of object received from the Kubernetes API server before starting watching for the updates.
Click to show internal directories.
Click to hide internal directories.