controller

package
v0.0.0-...-798ae07 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegisteredControllers []ControllerInterface

List of registered controller loops that are installed and begun at runtime.

Functions

This section is empty.

Types

type ControllerInterface

type ControllerInterface interface {
	// Begin workers starts up a number of threads for each controller in order
	// to start listening for incoming requests.
	BeginWorkers(number int)

	// Return the number of workers that should be default run on startup.
	RunWorkers() int

	// Stops all workers gracefully by sending them a signal to return and exit.
	// Send a exit code as well with this signal exit in order to invoke specific
	// exit behavior.
	GracefulStop(uint8)
}

ControllerInterface represents a controller that manages the state for components within the control plane. Controllers watch for updates to the state from the API, and work to both set the current state to correlate with the desired state. Controllers are not responsible for interfacing with the persistence controller to persist the desired state of the controlplane, with the notable exception of the storage controller, which directly interfaces with and manages backends.

Otherwise, controllers are supposed to create a number of worker threads (the number to be determined by the user/main control loop), which then listen on channels for incoming events from the API, and then act accordingly with an incoming event. They interface with methods such as the node grpc server/ cri grpc server in order to create the desired state on the host.

type StopChan

type StopChan chan uint8

StopChan specifies a standard interface for killing worker threads within controllers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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