Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextCancel ¶
type ContextCancel = Pair[context.CancelFunc, context.Context]
ContextCancel represents a pair of a cancel function and a context. It is used in operations that create new contexts with cancellation capabilities.
The first element is the CancelFunc that should be called to release resources. The second element is the new Context that was created.
type Pair ¶
Pair represents a tuple of two values of types A and B. It is used to group two related values together.
type Reader ¶
func AskValue ¶ added in v2.3.138
AskValue reads the value stored under key and asserts it to V. It returns None if the key is absent or the stored value is not a V.
func WithValueNopCancel ¶ added in v2.3.138
func WithValueNopCancel[K, V any](key K, value V) Reader[ContextCancel]
WithValueNopCancel derives a child context carrying key → value, paired with a no-op cancel function, suitable for Local-style combinators.