Documentation
¶
Index ¶
- type Ctx
- func Background() *Ctx
- func NewCtxFromContext(parent context.Context) *Ctx
- func TODO() *Ctx
- func WithCancel(parent context.Context) (ctx *Ctx, cancel context.CancelFunc)
- func WithDeadline(parent context.Context, d time.Time) (ctx *Ctx, cancel context.CancelFunc)
- func WithTimeout(parent context.Context, timeout time.Duration) (ctx *Ctx, cancel context.CancelFunc)
- func WithTrace(parent context.Context, trace string) *Ctx
- func WithValue(parent context.Context, key, val interface{}) *Ctx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
Ctx is extension of common Context with added Logger.
func Background ¶
func Background() *Ctx
Background is the same as context.Background() but always returns Ctx.
func NewCtxFromContext ¶
NewCtxFromContext creates new Ctx from context.Context.
func WithCancel ¶
func WithCancel(parent context.Context) (ctx *Ctx, cancel context.CancelFunc)
WithCancel is the same as context.WithCancel() but always returns Ctx.
func WithDeadline ¶
WithDeadline is the same as context.WithDeadline() but always returns Ctx.
func WithTimeout ¶
func WithTimeout(parent context.Context, timeout time.Duration) (ctx *Ctx, cancel context.CancelFunc)
WithTimeout is the same as context.WithTimeout() but always returns Ctx.
Click to show internal directories.
Click to hide internal directories.