Documentation
¶
Index ¶
- func BindConfigToFlags(v *viper.Viper, cmd *cobra.Command, config any) error
- func CommonFlags() *pflag.FlagSet
- func LoadConfigFromContext(ctx context.Context) any
- func NewDefaultConfig(rootCmd *cobra.Command) (*viper.Viper, error)
- func SetConfigInContext(ctx context.Context, config any) context.Context
- type CommonServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindConfigToFlags ¶ added in v0.145.0
func CommonFlags ¶ added in v0.144.0
func LoadConfigFromContext ¶
func NewDefaultConfig ¶ added in v0.145.0
Types ¶
type CommonServiceConfig ¶ added in v0.144.0
type CommonServiceConfig struct { DebugLabelValue string `mapstructure:"debug-label-value"` MaxConcurrentReconciles int `mapstructure:"max-concurrent-reconciles"` Environment string `mapstructure:"environment"` Region string `mapstructure:"region"` Kubeconfig string `mapstructure:"kubeconfig"` Image struct { Name string `mapstructure:"image-name"` Tag string `mapstructure:"image-tag"` } `mapstructure:",squash"` Log struct { Level string `mapstructure:"log-level"` NoJson bool `mapstructure:"no-json"` } `mapstructure:",squash"` ShutdownTimeout time.Duration `mapstructure:"shutdown-timeout"` MetricsBindAddress string `mapstructure:"metric-bind-address"` HealthProbeBindAddress string `mapstructure:"health-probe-bind-address"` LeaderElection struct { Enabled bool `mapstructure:"leader-elect"` } `mapstructure:",squash"` Sentry struct { Dsn string `mapstructure:"sentry-dsn"` } `mapstructure:",squash"` }
Click to show internal directories.
Click to hide internal directories.