settings

package
v0.32.10 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = settingsKeyType{}

Functions

func ToContext

func ToContext(ctx context.Context, s *Settings) context.Context

Types

type Injectable

type Injectable interface {
	ConfigMap() string
	Inject(context.Context, *v1.ConfigMap) (context.Context, error)
}

Injectable defines a ConfigMap registration to be loaded into context on startup

type Settings

type Settings struct {
	BatchMaxDuration  time.Duration
	BatchIdleDuration time.Duration
	// This feature flag is temporary and will be removed in the near future.
	DriftEnabled bool
}

+k8s:deepcopy-gen=true

func FromContext

func FromContext(ctx context.Context) *Settings

func (*Settings) ConfigMap

func (*Settings) ConfigMap() string

func (*Settings) DeepCopy

func (in *Settings) DeepCopy() *Settings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Settings.

func (*Settings) DeepCopyInto

func (in *Settings) DeepCopyInto(out *Settings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Settings) Inject

func (*Settings) Inject(ctx context.Context, cm *v1.ConfigMap) (context.Context, error)

Inject creates a Settings from the supplied ConfigMap

func (*Settings) Validate

func (in *Settings) Validate() (err error)

Jump to

Keyboard shortcuts

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