config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config contains the operator's runtime configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config holds the static configuration for this operator.

func New

func New(opts ...Option) Config

New constructs a new configuration based on the given options.

func (*Config) AutoDetect

func (c *Config) AutoDetect() error

AutoDetect attempts to automatically detect relevant information for this operator.

func (*Config) AutoscalingVersion

func (c *Config) AutoscalingVersion() autodetect.AutoscalingVersion

AutoscalingVersion represents the preferred version of autoscaling.

func (*Config) LabelsFilter

func (c *Config) LabelsFilter() []string

LabelsFilter Returns the filters converted to regex strings used to filter out unwanted labels from propagations.

func (*Config) OpenShiftRoutes

func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability

OpenShiftRoutes represents the availability of the OpenShift Routes API.

func (*Config) RegisterOpenShiftRoutesChangeCallback

func (c *Config) RegisterOpenShiftRoutesChangeCallback(f func() error)

RegisterOpenShiftRoutesChangeCallback registers the given function as a callback that is called when the OpenShift Routes detection detects a change.

func (*Config) StartAutoDetect

func (c *Config) StartAutoDetect() error

StartAutoDetect attempts to automatically detect relevant information for this operator. This will block until the first run is executed and will schedule periodic updates.

type Option

type Option func(c *options)

Option represents one specific configuration option.

func WithAutoDetect

func WithAutoDetect(a autodetect.AutoDetect) Option

func WithAutoDetectFrequency

func WithAutoDetectFrequency(t time.Duration) Option

func WithLabelFilters

func WithLabelFilters(labelFilters []string) Option

func WithLogger

func WithLogger(logger logr.Logger) Option

func WithOnOpenShiftRoutesChangeCallback

func WithOnOpenShiftRoutesChangeCallback(f func() error) Option

func WithVersion

func WithVersion(v version.Version) Option

Jump to

Keyboard shortcuts

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