context

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyNamespace = contextKey("namespace")

Variables

This section is empty.

Functions

func CreateCacheKey

func CreateCacheKey(ctx context.Context, key string) string

CreateCacheKey creates a new cache key prefixed with embedded namespace.

func GetNamespace

func GetNamespace(ctx context.Context) string

GetNamespace returns the embedded namespace from the context.

func SetContextWithNamespace

func SetContextWithNamespace(ctx context.Context, namespace string) context.Context

SetContextWithNamespace embeds namespace to the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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