hcontext

package
v0.124.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextDispatcher

type ContextDispatcher[T any] interface {
	Set(ctx context.Context, value T) context.Context
	Get(ctx context.Context) T
}

ContextDispatcher is a generic interface for setting and getting values from a context.

func NewContextDispatcher

func NewContextDispatcher[T any, R comparable](key R) ContextDispatcher[T]

NewContextDispatcher creates a new ContextDispatcher with the given key.

Jump to

Keyboard shortcuts

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