Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delegate ¶ added in v1.0.2
Delegate returns a context that keeps all values of the valueCtx while taking its cancellation signal and error from the cancelCtx.
func Detach ¶
Detach returns a context that keeps all values of the parent context but detaches from its cancellation and error handling.
func WithAcyclicBreadcrumb ¶ added in v1.0.3
func WithAcyclicBreadcrumb[V comparable](ctx context.Context, breadcrumbID V) (context.Context, bool)
WithAcyclicBreadcrumb return a new context with the given breadcrumbID embedded inside and true if this ID has never been encountered in the execution path before. Otherwise, it returns a nil context.Context and false to indicate the execution is running in circle.
Note: the provided breadcrumbID must be comparable and should not be of type string or any other built-in type to avoid collisions between packages using this context. You should define your own types for breadcrumbID similar to the best practices for using context.WithValue.
Types ¶
This section is empty.