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 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
Click to show internal directories.
Click to hide internal directories.