Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { *datax.MemoryContext *logx.LogContext *tracex.TraceContext *alarmx.AlarmContext }
Context is the carrier of request and response
func NewDefaultContext ¶
NewDefaultContext 创建 app 默认的context, spanName
func (*Context) Deadline ¶
Deadline returns the time when work done on behalf of this contextx should be canceled. Deadline returns ok==false when no deadline is set. Successive calls to Deadline return the same results.
func (*Context) Done ¶
func (c *Context) Done() <-chan struct{}
Done returns a channel that's closed when work done on behalf of this contextx should be canceled. Done may return nil if this contextx can never be canceled. Successive calls to Done return the same value.
func (*Context) Err ¶
Err returns a non-nil error value after Done is closed, successive calls to Err return the same error. If Done is not yet closed, Err returns nil. If Done is closed, Err returns a non-nil error explaining why: Canceled if the contextx was canceled or DeadlineExceeded if the contextx's deadline passed.