package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

CanDirectlyDetectCancellation checks to make sure that the parent context can be used to detect parent cancellation without the need to spin up goroutine.
FastValue retrieves the value for the given key.
LogTagsFromContext returns the log tags from the context, if any.
RegisterFastValueKey creates a key that can be used with WithFastValue().
WhenDone arranges for the specified function to be invoked when parent context becomes done and returns true.
WithFastValue creates a new context with a new value for the given key.
WithFastValues starts the process of creating a new context that sets a number of fast values.
WithFastValuesPrealloc is like WithFastValues, but preallocates multiple contexts that can later be reused on subsequent WithFastValue(s) calls to save on allocations.
WithLogTags returns a context with the given tags.

# Constants

MaxFastValues is the number of FastValueKeys that can be registered.

# Variables

# Structs

FastValuesBuilder contains multiple values; used for WithFastValues.

# Type aliases

FastValueKey is a key that can be used to get and set a fast value.
WhenDoneFunc is the callback invoked by context when it becomes done.