Documentation ¶
Index ¶
- type Context
- func (c Context) Clone() Context
- func (c Context) Debugf(format string, args ...interface{})
- func (c Context) Error(err error, msg ...any)
- func (c Context) Errorf(format string, args ...interface{})
- func (c Context) GetSpan() trace.Span
- func (c Context) GetTracer() trace.Tracer
- func (c Context) Infof(format string, args ...interface{})
- func (c Context) IsDebug() bool
- func (c Context) IsTrace() bool
- func (c Context) Logf(level int, format string, args ...interface{})
- func (c Context) StartSpan(name string) (Context, trace.Span)
- func (c Context) String() string
- func (c Context) Tracef(format string, args ...interface{})
- func (c Context) Warnf(format string, args ...interface{})
- func (c Context) WithDeadline(deadline time.Time) (Context, gocontext.CancelFunc)
- func (c Context) WithDebug() Context
- func (c Context) WithTimeout(timeout time.Duration) (Context, gocontext.CancelFunc)
- func (c Context) WithTrace() Context
- func (c *Context) WithTracer(tracer trace.Tracer)
- func (c Context) WithValue(key, val interface{}) Context
- func (c Context) WithoutSpan() Context
- type ContextOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { gocontext.Context Logger logger.Logger // contains filtered or unexported fields }
func NewContext ¶
func NewContext(basectx gocontext.Context, opts ...ContextOptions) Context
func (Context) WithDeadline ¶ added in v1.21.0
func (Context) WithTimeout ¶ added in v1.14.2
func (*Context) WithTracer ¶
func (Context) WithoutSpan ¶ added in v1.26.0
type ContextOptions ¶
type ContextOptions func(*Context)
func WithDebugFn ¶
func WithDebugFn(fn func(Context) *bool) ContextOptions
func WithLogger ¶
func WithLogger(log logger.Logger) ContextOptions
func WithTraceFn ¶
func WithTraceFn(fn func(Context) *bool) ContextOptions
func WithTracer ¶
func WithTracer(tracer trace.Tracer) ContextOptions
Click to show internal directories.
Click to hide internal directories.