config

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ListenAndServeWrapper = func(srv *nethttp.Server) func() error { return srv.ListenAndServe }
	StartWatcherWrapper   = func(cmw *configmap.InformedWatcher, done <-chan struct{}) error { return cmw.Start(done) }
	UpdateExporterWrapper = metrics.UpdateExporter
)

These wrapper functions are to facilitate minimally-invasive unit testing of the InitializeObservability functionality without requiring live servers to be started.

Functions

func InitializeObservability

func InitializeObservability(ctx context.Context, logger *zap.SugaredLogger, metricsDomain string, metricsPort int, namespace string) error

Initialize The Specified Context With A Profiling Server (ConfigMap Watcher And HTTP Endpoint) Much Of This Function Is Taken From The knative.dev sharedmain Package

func InitializeSecretWatcher added in v0.21.0

func InitializeSecretWatcher(ctx context.Context, namespace string, name string, resyncTime time.Duration, observer SecretObserver) error

InitializeSecretWatcher Initializes The Specified Context With A Secret Informer

func InitializeTracing

func InitializeTracing(logger *zap.SugaredLogger, ctx context.Context, service string, namespace string) error

Initialize The Specified Context With A Tracer (ConfigMap Watcher) Assumes ctx Has K8S Client Injected Via LoggingContext (Or Similar)

Types

type SecretObserver added in v0.21.0

type SecretObserver func(ctx context.Context, secret *corev1.Secret)

Jump to

Keyboard shortcuts

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