options

package
v0.4.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package options provides functional options for controller runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option is a functional option for controller runtime.

func WithChangeRateLimit

func WithChangeRateLimit(limit rate.Limit, burst int) Option

WithChangeRateLimit sets rate limit for changes performed by controllers.

This might be used to rate limit ill-behaving controllers from overloading the system with changes.

func WithMetrics

func WithMetrics(enabled bool) Option

WithMetrics enables runtime metrics to be exposed via metrics package.

type Options

type Options struct {
	// ChangeRateLimit and ChangeBurst configure rate limiting of changes performed by controllers.
	ChangeRateLimit rate.Limit
	ChangeBurst     int
	MetricsEnabled  bool
}

Options configures controller runtime.

func DefaultOptions

func DefaultOptions() Options

DefaultOptions returns default value of Options.

Jump to

Keyboard shortcuts

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