package onecontext

Import Path
	github.com/teivah/onecontext (on go.dev)

Dependency Relation
	imports 5 packages, and imported by one package

Involved Source Files detach.go Package onecontext provides a mechanism to merge multiple existing contexts. reset.go
Package-Level Type Names (total 3)
/* sort by: | */
DetachedContext holds the logic to detach a cancellation signal from a context. Deadline returns a nil deadline. Done returns a cancellation signal that expires only when the context is canceled from the cancel function returned in Detach. Err returns an error if the context is canceled from the cancel function returned in Detach. Value returns the value associated with the key from the original context. *DetachedContext : context.Context func Detach(ctx context.Context) (*DetachedContext, func())
OneContext is the struct holding the context grouping logic. Deadline returns the minimum deadline among all the contexts. Done returns a channel for cancellation. Err returns the first error raised by the contexts, otherwise a nil error. Value returns the value associated with the key from one of the contexts. *OneContext : context.Context
ResetValuesContext holds the logic reset the values of a context. Deadline returns the original context deadline. Done returns the original done channel. Err returns the original context error. Value returns nil regardless of the key. *ResetValuesContext : context.Context func ResetValues(ctx context.Context) *ResetValuesContext
Package-Level Functions (total 3)
Detach detaches the cancellation signal from a context.
Merge allows to merge multiple contexts. It returns the merged context and a CancelFunc to cancel it.
ResetValues reset the values of a context.
Package-Level Variables (only one)
ErrCanceled is the returned when the CancelFunc returned by Merge is called.