configobserver

package
v0.0.0-...-a892dfa Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigObserver

type ConfigObserver struct {
	// contains filtered or unexported fields
}

func NewConfigObserver

func NewConfigObserver(
	operatorClient v1helpers.OperatorClient,
	eventRecorder events.Recorder,
	listers Listers,
	observers ...ObserveConfigFunc,
) *ConfigObserver

func (*ConfigObserver) EventHandler

func (c *ConfigObserver) EventHandler() cache.ResourceEventHandler

eventHandler queues the operator to check spec and status

func (*ConfigObserver) Run

func (c *ConfigObserver) Run(workers int, stopCh <-chan struct{})

type Listers

type Listers interface {
	// ResourceSyncer can be used to copy content from one namespace to another
	ResourceSyncer() resourcesynccontroller.ResourceSyncer
	PreRunHasSynced() []cache.InformerSynced
}

Listers is an interface which will be passed to the config observer funcs. It is expected to be hard-cast to the "correct" type

type ObserveConfigFunc

type ObserveConfigFunc func(listers Listers, recorder events.Recorder, existingConfig map[string]interface{}) (observedConfig map[string]interface{}, errs []error)

ObserveConfigFunc observes configuration and returns the observedConfig. This function should not return an observedConfig that would cause the service being managed by the operator to crash. For example, if a required configuration key cannot be observed, consider reusing the configuration key's previous value. Errors that occur while attempting to generate the observedConfig should be returned in the errs slice.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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