controller

package
v3.9.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToManagerFuncs []func(manager.Manager) error

AddToManagerFuncs is a list of functions to add all Controllers to the Manager.

View Source
var Injectors []Injector

Injectors is a list of adder structs that need injection. We can convert this to an interface once we create controllers for things like data sync.

Functions

func AddToManager

func AddToManager(m manager.Manager, deps Dependencies) error

AddToManager adds all Controllers to the Manager.

Types

type Dependencies

type Dependencies struct {
	Opa              *constraintclient.Client
	WatchManger      *watch.Manager
	ControllerSwitch *watch.ControllerSwitch
	Tracker          *readiness.Tracker
	GetPod           func(context.Context) (*corev1.Pod, error)
	ProcessExcluder  *process.Excluder
	MutationSystem   *mutation.System
	ProviderCache    *externaldata.ProviderCache
	WatchSet         *watch.Set
}

Dependencies are dependencies that can be injected into controllers.

type GetPodInjector

type GetPodInjector interface {
	InjectGetPod(func(context.Context) (*corev1.Pod, error))
}

type GetProcessExcluderInjector

type GetProcessExcluderInjector interface {
	InjectProcessExcluder(processExcluder *process.Excluder)
}

type Injector

type Injector interface {
	InjectOpa(*constraintclient.Client)
	InjectWatchManager(*watch.Manager)
	InjectControllerSwitch(*watch.ControllerSwitch)
	InjectTracker(tracker *readiness.Tracker)
	InjectMutationSystem(mutationSystem *mutation.System)
	InjectProviderCache(providerCache *externaldata.ProviderCache)
	Add(mgr manager.Manager) error
}

type WatchSetInjector

type WatchSetInjector interface {
	InjectWatchSet(watchSet *watch.Set)
}

Jump to

Keyboard shortcuts

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