appctx

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeletingSharedResource struct{}

DeletingSharedResource flags to a storage a shared resource is being deleted not by the owner.

Functions

func GetKeyValuesFromCtx added in v0.0.2

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 PutKeyValuesToCtx added in v0.0.2

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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