Documentation
¶
Index ¶
- type Context
- type ContextStruct
- func (ctx *ContextStruct) Add() Context
- func (ctx *ContextStruct) Cancel()
- func (ctx *ContextStruct) CancelDeadline() (ok bool)
- func (ctx *ContextStruct) Created() time.Time
- func (ctx *ContextStruct) Deadline() (t time.Time, ok bool)
- func (ctx *ContextStruct) Done() <-chan struct{}
- func (ctx *ContextStruct) Err() error
- func (ctx *ContextStruct) Finished()
- func (ctx *ContextStruct) Get(key string) (it any, ok bool)
- func (ctx *ContextStruct) NewChild() Context
- func (ctx *ContextStruct) SetDeadline(t time.Duration) (deadline time.Time)
- func (ctx *ContextStruct) SetParent(key string, val any) error
- func (ctx *ContextStruct) Value(key any) any
- func (ctx *ContextStruct) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context = *ContextStruct
type ContextStruct ¶
type ContextStruct struct { base.MutexedMap[any] // contains filtered or unexported fields }
func CreateNewContext ¶
func CreateNewContext() *ContextStruct
func CreateNewContextWithDeadline ¶
func CreateNewContextWithDeadline(t time.Duration) (ctx *ContextStruct)
func CreateNewContextWithParent ¶
func CreateNewContextWithParent(pctx context.Context) (ctx *ContextStruct)
func (*ContextStruct) Cancel ¶
func (ctx *ContextStruct) Cancel()
func (*ContextStruct) CancelDeadline ¶
func (ctx *ContextStruct) CancelDeadline() (ok bool)
func (*ContextStruct) Created ¶
func (ctx *ContextStruct) Created() time.Time
func (*ContextStruct) Done ¶
func (ctx *ContextStruct) Done() <-chan struct{}
func (*ContextStruct) Err ¶
func (ctx *ContextStruct) Err() error
func (*ContextStruct) NewChild ¶
func (ctx *ContextStruct) NewChild() Context
func (*ContextStruct) SetDeadline ¶
func (ctx *ContextStruct) SetDeadline(t time.Duration) (deadline time.Time)
func (*ContextStruct) SetParent ¶
func (ctx *ContextStruct) SetParent(key string, val any) error
Sets current context and parent context
func (*ContextStruct) Value ¶
func (ctx *ContextStruct) Value(key any) any
Click to show internal directories.
Click to hide internal directories.