conf

package
v0.0.0-...-74d59e4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(s *Source) error

Load the global operator configuration.

Types

type OperatorConfig

type OperatorConfig struct {
	SmbdContainerImage string `mapstructure:"smbd-container-image"`
	SmbdContainerName  string `mapstructure:"smbd-container-name"`
}

OperatorConfig is a type holding general configuration values. Most of the operator code that needs to reference configuration should do so via this type.

func Get

func Get() *OperatorConfig

Get the global operator configuration object.

type Source

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

Source is how external configuration sources populate the operator config.

func NewSource

func NewSource() *Source

NewSource creates a new Source based on default configuration values.

func (*Source) Flags

func (s *Source) Flags() *pflag.FlagSet

Flags returns a pflag FlagSet populated with flags based on the default configuration. If used, flags allow changing configuration values on the CLI. Once parsed these flags act as a configuration source.

func (*Source) Read

func (s *Source) Read() (*OperatorConfig, error)

Read a new OperatorConfig from all available sources.

Jump to

Keyboard shortcuts

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