events

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: 9 Imported by: 0

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

type OnListFunc func(*api_v1.EventList)

OnListFunc represent an action on the initial list of object received from the Kubernetes API server before starting watching for the updates.

Jump to

Keyboard shortcuts

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