controller

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// The Logger controllers should use.
	Logger logging.Logger

	// The GlobalRateLimiter used by this controller manager. The rate of
	// reconciles across all controllers will be subject to this limit.
	GlobalRateLimiter workqueue.RateLimiter

	// PollInterval at which each controller should speculatively poll to
	// determine whether it has work to do.
	PollInterval time.Duration

	// MaxConcurrentReconciles for each controller.
	MaxConcurrentReconciles int

	// UsePriorityQueue controls whether controller-runtime should use its
	// priority queue implementation when queue wait telemetry is enabled.
	// Defaults to true.
	UsePriorityQueue *bool

	// QueueWaitRecorder records how long requests spend waiting in the
	// controller queue before a worker starts processing them.
	QueueWaitRecorder QueueWaitRecorder
}

Options frequently used by most controllers.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns a functional set of options with conservative defaults.

func (Options) ForControllerRuntime

func (o Options) ForControllerRuntime() controller.Options

ForControllerRuntime extracts options for controller-runtime.

type QueueWaitRecorder added in v1.2.0

type QueueWaitRecorder interface {
	RecordQueueWaitDuration(ctx context.Context, d time.Duration)
	AddQueueDepth(ctx context.Context, delta int64)
	RecordQueueOldestItemAge(ctx context.Context, d time.Duration)
	RecordQueueWorkDuration(ctx context.Context, d time.Duration)
}

QueueWaitRecorder records queue telemetry for a controller queue.

Jump to

Keyboard shortcuts

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