config

package
v0.0.0-...-bb2d5e8 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHAEnvs

func GetHAEnvs() (string, string, error)

func GetLogLevel

func GetLogLevel(level string) logrus.Level

Types

type Config

type Config struct {
	CertFile          string  `yaml:"certFile" envconfig:"cert_file"`
	KeyFile           string  `yaml:"keyFile" envconfig:"key_file"`
	VaultAddress      string  `yaml:"vaultAddress" envconfig:"vault_address"`
	VaultAuthPath     string  `yaml:"vaultAuthPath" envconfig:"vault_auth_path"`
	LogLevel          string  `yaml:"logLevel" envconfig:"log_level"`
	KubeRole          string  `yaml:"kubeRole" envconfig:"kube_role"`
	TokenTTL          string  `yaml:"tokenTTL" envconfig:"token_ttl"`
	VaultSecretName   string  `yaml:"vaultSecretName" envconfig:"vault_secret_name"`
	VaultSecretPrefix string  `yaml:"vaultSecretPrefix" envconfig:"vault_secret_prefix"`
	Mode              string  `yaml:"mode" envconfig:"mode"`
	Sentry            bool    `yaml:"sentry" envconfig:"sentry"`
	SentryDsn         string  `yaml:"sentryDsn" envconfig:"sentry_dsn"`
	SentryEnvironment string  `yaml:"sentryEnvironment" envconfig:"sentry_environment"`
	SentrySampleRate  float64 `yaml:"sentrySampleRate" envconfig:"sentry_sample_rate"`
	SyncTTLSecond     int     `yaml:"syncTTLSecond" envconfig:"sync_ttl_second"`
	InjectorLabel     string  `yaml:"injectorLabel" envconfig:"injector_label"`
	DefaultEngine     string  `yaml:"defaultEngine" envconfig:"default_engine"`
	VaultRateLimit    int     `yaml:"vaultRateLimit" envconfig:"vault_rate_limit"`
}

func NewConfig

func NewConfig(configFile string) (*Config, error)

func (*Config) Validate

func (cfg *Config) Validate() error

Validate verifies all properties of config struct are intialized

Jump to

Keyboard shortcuts

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