Documentation
¶
Index ¶
- type Context
- func (ctx *Context) Deadline() (deadline time.Time, ok bool)
- func (ctx *Context) Done() <-chan struct{}
- func (ctx *Context) Err() error
- func (ctx *Context) Reset()
- func (ctx *Context) Value(key interface{}) interface{}
- func (ctx *Context) WithCancel() func()
- func (ctx *Context) WithDeadline(deadline time.Time)
- func (ctx *Context) WithTimeout(timeout time.Duration)
- func (ctx *Context) WithValue(key interface{}, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context is a reusable context.Context implementation, intended to be used as a singular context passed down through a data structure.
func (*Context) Done ¶
func (ctx *Context) Done() <-chan struct{}
Done implements context.Context .Done().
func (*Context) Value ¶
func (ctx *Context) Value(key interface{}) interface{}
Value implements context.Context .Value().
func (*Context) WithCancel ¶
func (ctx *Context) WithCancel() func()
WithCancel returns a cancel function for this context.
func (*Context) WithDeadline ¶
WithDeadline updates the context deadline to supplied time, time <= Now() does nothing.
func (*Context) WithTimeout ¶
WithTimeout updates the context deadline to now+timeout, time <= Now() does nothing.
Click to show internal directories.
Click to hide internal directories.