config

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MqttDefaultBrokerEnv = "NAMESPACE_BROKER_PORT"

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(envVarPrefix string, configInstance interface{}, options ...ViperOption) error

Types

type CephFs added in v2.1.1

type CephFs struct {
	CephFsMount           string `mapstructure:"cephFsMount"`           // The local directory containing the CephFs Volumes are presented (mounted)
	CephFsVolumeDirectory string `mapstructure:"cephFsVolumeDirectory"` // The local directory containing the CephFs Volumes are presented (mounted)
	StorageClass          string `mapstructure:"storageClass"`          // StorageClass filter (only serve virtual FS of this storage-class)
}

func (*CephFs) Verify added in v2.1.1

func (f *CephFs) Verify() error

type KubernetesApiConfiguration

type KubernetesApiConfiguration struct {
	InCluster            bool   `mapstructure:"inCluster"`
	KubernetesConfigFile string `mapstructure:"kubernetesConfigFile"`
}

func (*KubernetesApiConfiguration) Verify

func (c *KubernetesApiConfiguration) Verify() error

type MqttClientConfig

type MqttClientConfig struct {
	Broker              string              `mapstructure:"broker"`
	ClientId            string              `mapstructure:"clientId"`
	MqttTlsClientConfig MqttTlsClientConfig `mapstructure:"mqttTlsClientConfig"`
}

func (*MqttClientConfig) Verify

func (c *MqttClientConfig) Verify() error

TODO log entries here are not context-scoped, so will not be transferred to any client

type MqttTlsClientConfig

type MqttTlsClientConfig struct {
	ServerCaFile      string `mapstructure:"serverCaFile"`
	ClientCertFile    string `mapstructure:"clientCertFile"`
	ClientCertKeyFile string `mapstructure:"clientCertKeyFile"`
}

func (*MqttTlsClientConfig) Verify

func (c *MqttTlsClientConfig) Verify() error

TODO log entries here are not context-scoped, so will not be transferred to any client

type ViperOption

type ViperOption func(v *viper.Viper)

func WithConfigFile

func WithConfigFile(configFile string) ViperOption

/ ConfigFile (complete config file name i.e. "some-config-file.json" => some-config-file.json)

func WithConfigName

func WithConfigName(configName string) ViperOption

/ ConfigName (config file base name i.e. "config" => config.*)

func WithConfigPath

func WithConfigPath(path string) ViperOption

/ PATH (directory which get searched for config files)

func WithConfigType

func WithConfigType(configType string) ViperOption

/ ConfigType (config file extension i.e. "yaml" => [ConfigName].yaml)

func WithDefaultConfigName

func WithDefaultConfigName() ViperOption

func WithFileSystem

func WithFileSystem(fs afero.Fs) ViperOption

/ FileSystem (sets the used filesystem to read config file from)

func WithLocalPath

func WithLocalPath() ViperOption

Jump to

Keyboard shortcuts

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