Documentation
¶
Overview ¶
Mutable context, allows for easy setting additional values shared across all context and it's children
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCancel = errors.New("no cancel func")
returned if no cancel func present
Functions ¶
This section is empty.
Types ¶
type MutableContext ¶
type MutableContext interface {
context.Context
Set(key, value interface{})
Cancel() error
SetCleanup(cleanup FuncCleanup)
Complete()
Completed() bool
}
Mutable context interface, allows easy setting values and keeping cancel() function
func CreateNew ¶
func CreateNew(ctx context.Context) MutableContext
Constructor without cancel() function, will make ctx.Cancel() != nil
func CreateNewCancel ¶
func CreateNewCancel(ctx context.Context, cancel context.CancelFunc) MutableContext
Constructor with cancel() function
Click to show internal directories.
Click to hide internal directories.