source

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 21 modules, 158 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

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