api

package
v1.7.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionHandlerFunction

type ActionHandlerFunction func(runtime.Object)

ActionHandlerFunction is a callback function that can be registered on an watch event.

type Synchronizer

type Synchronizer interface {
	// Name returns unique name of created synchronizer.
	Name() string
	// Start synchronizer in a separate goroutine. Should not block thread that calls it.
	Start()
	// Error returns error channel. Any error that happens during running synchronizer will be send to this channel.
	Error() chan error
	// Create given runtime object matching synchronized object details (specially type, name, namespace).
	Create(runtime.Object) error
	// Returns local copy of synchronized object or nil in case object has not yet been created or running goroutine
	// did not yet synced it from server.
	Get() runtime.Object
	// Update synchronized object with given object.
	Update(runtime.Object) error
	// Delete synchronized object.
	Delete() error
	// Force synchronous refresh of local object with object got from kubernetes.
	Refresh()
	// RegisterActionHandler registers callback functions on given event types. They are automatically called by
	// watcher.
	RegisterActionHandler(ActionHandlerFunction, ...watch.EventType)
}

Synchronizer is used to watch over a kubernetes resource changes in real time. It can be used to i.e. synchronize encryption key data between multiple dashboard replicas.

type SynchronizerManager

type SynchronizerManager interface {
	// Secret created single secret synchronizer based on name and namespace information.
	Secret(namespace, name string) Synchronizer
}

SynchronizerManager interface is responsible for creating specific synchronizers.

Jump to

Keyboard shortcuts

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