source

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 158

Documentation

Index

Constants

View Source
const (
	EnvLoggingCfg       = "K_LOGGING_CONFIG"
	EnvObservabilityCfg = "K_OBSERVABILITY_CONFIG"
)

Variables

This section is empty.

Functions

func WithLogging

func WithLogging(cw *ConfigWatcher, cmw configmap.Watcher)

WithLogging observes a logging ConfigMap.

func WithObservability added in v0.46.0

func WithObservability(cw *ConfigWatcher, cmw configmap.Watcher)

Types

type ConfigAccessor

type ConfigAccessor interface {
	ToEnvVars() []corev1.EnvVar
	LoggingConfig() *logging.Config
	ObservabilityConfig() *observability.Config
}

type ConfigWatcher

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

ConfigWatcher keeps track of logging, metrics and tracing configurations by watching corresponding ConfigMaps.

func WatchConfigurations

func WatchConfigurations(loggingCtx context.Context, component string,
	cmw configmap.Watcher, opts ...configWatcherOption) *ConfigWatcher

WatchConfigurations returns a ConfigWatcher initialized with the given options. If no option is passed, the ConfigWatcher observes ConfigMaps for logging, and observability.

func (*ConfigWatcher) LoggingConfig

func (cw *ConfigWatcher) LoggingConfig() *logging.Config

LoggingConfig returns the logging configuration from the ConfigWatcher.

func (*ConfigWatcher) ObservabilityConfig added in v0.46.0

func (cw *ConfigWatcher) ObservabilityConfig() *observability.Config

func (*ConfigWatcher) ToEnvVars

func (cw *ConfigWatcher) ToEnvVars() []corev1.EnvVar

ToEnvVars serializes the contents of the ConfigWatcher to individual environment variables.

type EmptyVarsGenerator

type EmptyVarsGenerator struct {
	ConfigAccessor
}

EmptyVarsGenerator generates empty env vars. Intended to be used in tests.

func (*EmptyVarsGenerator) ToEnvVars

func (g *EmptyVarsGenerator) ToEnvVars() []corev1.EnvVar

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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