appctx

package
v2.52.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 2 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

This section is empty.

Variables

This section is empty.

Functions

func GetKeyValuesFromCtx

func GetKeyValuesFromCtx(ctx context.Context) map[interface{}]interface{}

GetKeyValuesFromCtx retrieves all the key-value pairs from the provided context.

func GetLogger

func GetLogger(ctx context.Context) *zerolog.Logger

GetLogger returns the logger associated with the given context or a disabled logger in case no logger is stored inside the context.

func GetTracerProvider

func GetTracerProvider(ctx context.Context) trace.TracerProvider

GetTracerProvider returns the TracerProvider associated with the given context. (Or the global default TracerProvider if there is no TracerProvider in the context)

func PutKeyValuesToCtx

func PutKeyValuesToCtx(m map[interface{}]interface{}) context.Context

PutKeyValuesToCtx puts all the key-value pairs from the provided map to a background context.

func WithLogger

func WithLogger(ctx context.Context, l *zerolog.Logger) context.Context

WithLogger returns a context with an associated logger.

func WithTracerProvider

func WithTracerProvider(ctx context.Context, p trace.TracerProvider) context.Context

WithTracerProvider returns a context with an associated TracerProvider

Types

This section is empty.

Jump to

Keyboard shortcuts

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