operator

package
v0.0.0-...-36a0ee6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVSphereProblemDetectorController

func NewVSphereProblemDetectorController(
	operatorClient v1helpers.OperatorClientWithFinalizers,
	kubeClient kubernetes.Interface,
	namespacedInformer v1helpers.KubeInformersForNamespaces,
	configInformer infrainformer.InfrastructureInformer,
	eventRecorder events.Recorder,
	clusterCSIDriverInformer clustercsidriverinformer.ClusterCSIDriverInformer) factory.Controller

func RunOperator

func RunOperator(ctx context.Context, controllerConfig *controllercmd.ControllerContext) error

Types

type CheckThreadPool

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

CheckThreadPool runs individual functions (presumably checks) as go routines. It makes sure that only limited number of functions actually run in parallel.

func NewCheckThreadPool

func NewCheckThreadPool(parallelism int, channelBufferSize int) *CheckThreadPool

Creates a new CheckThreadPool with given max. number of goroutines.

func (*CheckThreadPool) RunGoroutine

func (r *CheckThreadPool) RunGoroutine(ctx context.Context, check func())

RunGoroutine runs given check in a worker goroutine. This call can block until a worker goroutine is available.

func (*CheckThreadPool) Wait

func (r *CheckThreadPool) Wait(ctx context.Context) error

Wait blocks until all previously started goroutines finish or ctx expires.

type ResultCollector

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

ResultCollector accumulates results of each check, as the checks run in parallel.

func NewResultsCollector

func NewResultsCollector() *ResultCollector

NewResultCollector creates a new ResultCollector

func (*ResultCollector) AddResult

func (r *ResultCollector) AddResult(res checkResult)

AddResult stores result of a single check. It is allowed to store result of a single check several times, e.g. once for each node. The collector will merge the result.

func (*ResultCollector) Collect

func (r *ResultCollector) Collect() ([]checkResult, error)

Collect returns currently accumulated checks. It merges results of the same check into a single error It returns status of each check and overall succeeded / failed status of all checks.

Jump to

Keyboard shortcuts

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