Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelErrFunc ¶
type CancelErrFunc func(err error)
CancelErrFunc cancels a context simular to context.CancelFunc. However it indicates why the context was canceled with the provided error.
func WithCancelCause ¶
func WithCancelCause(parent context.Context) (context.Context, CancelErrFunc)
WithCancelCause returns a copy of parent with a new Done channel. The returned context's Done channel is closed when the returned cancel function is called or when the parent context's Done channel is closed, whichever happens first. Unlike the conext package's WithCancel, the cancel func takes an error, and will return that error on subsequent calls to Err().
Click to show internal directories.
Click to hide internal directories.