Documentation
¶
Overview ¶
Package context contains generated code by adptool.
Index ¶
- Variables
- func AfterFunc(ctx context.Context, f func()) (stop func() bool)
- func Background() context.Context
- func Cause(c context.Context) error
- func FromCreatedBy(ctx context.Context) string
- func FromID(ctx context.Context) string
- func FromRowLock(ctx context.Context) bool
- func FromToken(ctx context.Context) string
- func FromTrace(ctx context.Context) string
- func FromTrans(ctx context.Context) bool
- func NewCreatedBy(ctx context.Context, id string) context.Context
- func NewID(ctx context.Context, id string) context.Context
- func NewRowLock(ctx context.Context, lock bool) context.Context
- func NewToken(ctx context.Context, token string) context.Context
- func NewTrace(ctx context.Context, traceID string) context.Context
- func NewTrans(ctx context.Context, trans bool) context.Context
- func TODO() context.Context
- func WithCancel(parent context.Context) (ctx context.Context, cancel context.CancelFunc)
- func WithCancelCause(parent context.Context) (ctx context.Context, cancel context.CancelCauseFunc)
- func WithDeadline(parent context.Context, d time.Time) (context.Context, context.CancelFunc)
- func WithDeadlineCause(parent context.Context, d time.Time, cause error) (context.Context, context.CancelFunc)
- func WithTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
- func WithTimeoutCause(parent context.Context, timeout time.Duration, cause error) (context.Context, context.CancelFunc)
- func WithValue(parent context.Context, key, val any) context.Context
- func WithoutCancel(parent context.Context) context.Context
- type CancelCauseFunc
- type CancelFunc
- type Context
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Canceled = context.Canceled DeadlineExceeded = context.DeadlineExceeded )
Functions ¶
func Background ¶
func FromCreatedBy ¶
FromCreatedBy returns the creator ID from the context.
func FromRowLock ¶
FromRowLock returns the row lock flag from the context.
func NewCreatedBy ¶
NewCreatedBy creates a new context with the creator ID.
func NewRowLock ¶
NewRowLock creates a new context with the row lock flag.
func WithCancel ¶
func WithCancelCause ¶
func WithDeadline ¶
func WithDeadlineCause ¶
func WithTimeout ¶
func WithTimeoutCause ¶
Types ¶
type CancelCauseFunc ¶
type CancelCauseFunc = context.CancelCauseFunc
type CancelFunc ¶
type CancelFunc = context.CancelFunc
Click to show internal directories.
Click to hide internal directories.