operator

package
v0.0.0-...-e0d34a4 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WorkerIDKey ctxKeyWorkerID = 0

WorkerIDKey is the key that holds the worker id.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeHandler

type ChangeHandler interface {

	// CreateOrUpdate handles creation/update of an object
	CreateOrUpdate(context.Context, runtime.Object) error

	// Delete handles delete of an object
	Delete(context.Context, string, string) error
}

ChangeHandler handles changes to object

type MultiWorker

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

func (*MultiWorker) Start

func (mw *MultiWorker) Start(ctx context.Context) error

func (*MultiWorker) Stop

func (mw *MultiWorker) Stop() chan struct{}

type Operator

type Operator interface {

	// Start starts the operator, listening for changes
	Start(ctx context.Context) error

	// Stop stops the operator, returning a completion channel
	Stop() chan struct{}
}

Operator is a controller with a CRD

func NewMultiWorker

func NewMultiWorker(ctx context.Context,
	parentLogger logger.Logger,
	numWorkers int,
	listWatcher cache.ListerWatcher,
	object runtime.Object,
	resyncInterval *time.Duration,
	changeHandler ChangeHandler) (Operator, error)

Jump to

Keyboard shortcuts

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