Documentation
¶
Overview ¶
Package contextmanager simulates multiple-parent contexts with sticky cancellation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager tracks contexts derived from the root context.
func (*Manager[K]) Cancel ¶
Cancel cancels the context for the given key with reason. If no context exists for the key a context will be created and cancelled.
func (*Manager[K]) Context ¶
Context returns a new context that is derived from parent. The context will be cancelled if either the manager's root context or the respective key context is cancelled.
Click to show internal directories.
Click to hide internal directories.