Documentation ¶
Index ¶
- Variables
- func InitializeObservability(ctx context.Context, logger *zap.SugaredLogger, metricsDomain string, ...) error
- func InitializeSecretWatcher(ctx context.Context, namespace string, name string, resyncTime time.Duration, ...) error
- func InitializeTracing(logger *zap.SugaredLogger, ctx context.Context, service string, ...) error
- type SecretObserver
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 ¶
Click to show internal directories.
Click to hide internal directories.