overrides

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tracing TracingConfig `yaml:"tracing,omitempty"`
	Logging LoggingConfig `yaml:"logging,omitempty"`
	Metrics MetricConfig  `yaml:"metrics,omitempty"`
	Global  GlobalConfig  `yaml:"global,omitempty"`
}

type ConfigMapProber

type ConfigMapProber interface {
	ReadConfigMapOrEmpty(ctx context.Context, name types.NamespacedName) (string, error)
}

type GlobalConfig

type GlobalConfig struct {
	LogLevel string `yaml:"logLevel,omitempty"`
}

type GlobalConfigHandler

type GlobalConfigHandler interface {
	CheckGlobalConfig(config GlobalConfig) error
	UpdateOverrideConfig(ctx context.Context, overrideConfigMap types.NamespacedName) (Config, error)
}

type Handler

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

func New

func New(loglevelChanger *logger.LogLevel, cmProber ConfigMapProber) *Handler

func (*Handler) CheckGlobalConfig

func (m *Handler) CheckGlobalConfig(config GlobalConfig) error

func (*Handler) UpdateOverrideConfig

func (m *Handler) UpdateOverrideConfig(ctx context.Context, overrideConfigMap types.NamespacedName) (Config, error)

type LogLevelChanger

type LogLevelChanger interface {
	ChangeLogLevel(level string) error
	SetDefaultLogLevel() error
}

type LoggingConfig

type LoggingConfig struct {
	Paused bool `yaml:"paused,omitempty"`
}

type MetricConfig

type MetricConfig struct {
	Paused bool `yaml:"paused,omitempty"`
}

type TracingConfig

type TracingConfig struct {
	Paused bool `yaml:"paused,omitempty"`
}

Jump to

Keyboard shortcuts

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