configvar

package
v1.63.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

func NewResolver

func NewResolver(ctx context.Context, client ctrlruntimeclient.Client) *Resolver

func (*Resolver) GetBoolValue

func (r *Resolver) GetBoolValue(configVar providerconfig.ConfigVarBool) (bool, bool, error)

GetBoolValue returns a boolean from a ConfigVarBool. If there is no valid source for the boolean, the second bool returned will be false (to be able to differentiate between "false" and "unset").

func (*Resolver) GetBoolValueOrEnv

func (r *Resolver) GetBoolValueOrEnv(configVar providerconfig.ConfigVarBool, envVarName string) (bool, error)

func (*Resolver) GetDurationValue

func (r *Resolver) GetDurationValue(configVar providerconfig.ConfigVarString) (time.Duration, error)

func (*Resolver) GetDurationValueOrDefault

func (r *Resolver) GetDurationValueOrDefault(configVar providerconfig.ConfigVarString, defaultDuration time.Duration) (time.Duration, error)

func (*Resolver) GetStringValue

func (r *Resolver) GetStringValue(configVar providerconfig.ConfigVarString) (string, error)

func (*Resolver) GetStringValueOrEnv

func (r *Resolver) GetStringValueOrEnv(configVar providerconfig.ConfigVarString, envVarName string) (string, error)

GetStringValueOrEnv tries to get the value from ConfigVarString, when it fails, it falls back to getting the value from an environment variable specified by envVarName parameter.

Jump to

Keyboard shortcuts

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