Documentation
¶
Index ¶
- Variables
- func NewGocoreTraceService(params ...interface{}) (interface{}, error)
- type GocoreTraceProvider
- func (provider *GocoreTraceProvider) Boot(c framework.Container) error
- func (provider *GocoreTraceProvider) IsDefer() bool
- func (provider *GocoreTraceProvider) Name() string
- func (provider *GocoreTraceProvider) Params(c framework.Container) []interface{}
- func (provider *GocoreTraceProvider) Register(c framework.Container) framework.NewInstance
- type GocoreTraceService
- func (t *GocoreTraceService) ExtractHTTP(req *http.Request) *contract.TraceContext
- func (t *GocoreTraceService) GetTrace(c context.Context) *contract.TraceContext
- func (t *GocoreTraceService) InjectHTTP(req *http.Request, tc *contract.TraceContext) *http.Request
- func (t *GocoreTraceService) NewTrace() *contract.TraceContext
- func (t *GocoreTraceService) SetSpanIDService(service contract.IDService)
- func (t *GocoreTraceService) SetTraceIDService(service contract.IDService)
- func (t *GocoreTraceService) StartSpan(tc *contract.TraceContext) *contract.TraceContext
- func (t *GocoreTraceService) ToMap(tc *contract.TraceContext) map[string]string
- func (t *GocoreTraceService) WithTrace(c context.Context, trace *contract.TraceContext) context.Context
- type TraceKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextKey = TraceKey("trace-key")
Functions ¶
func NewGocoreTraceService ¶
func NewGocoreTraceService(params ...interface{}) (interface{}, error)
Types ¶
type GocoreTraceProvider ¶
type GocoreTraceProvider struct {
// contains filtered or unexported fields
}
func (*GocoreTraceProvider) Boot ¶
func (provider *GocoreTraceProvider) Boot(c framework.Container) error
Boot will called when the service instantiate
func (*GocoreTraceProvider) IsDefer ¶
func (provider *GocoreTraceProvider) IsDefer() bool
IsDefer define whether the service instantiate when first make or register
func (*GocoreTraceProvider) Name ¶
func (provider *GocoreTraceProvider) Name() string
/ Name define the name for this service
func (*GocoreTraceProvider) Params ¶
func (provider *GocoreTraceProvider) Params(c framework.Container) []interface{}
Params define the necessary params for NewInstance
func (*GocoreTraceProvider) Register ¶
func (provider *GocoreTraceProvider) Register(c framework.Container) framework.NewInstance
Register registe a new function for make a service instance
type GocoreTraceService ¶
type GocoreTraceService struct {
// contains filtered or unexported fields
}
func (*GocoreTraceService) ExtractHTTP ¶
func (t *GocoreTraceService) ExtractHTTP(req *http.Request) *contract.TraceContext
func (*GocoreTraceService) GetTrace ¶
func (t *GocoreTraceService) GetTrace(c context.Context) *contract.TraceContext
func (*GocoreTraceService) InjectHTTP ¶
func (t *GocoreTraceService) InjectHTTP(req *http.Request, tc *contract.TraceContext) *http.Request
func (*GocoreTraceService) NewTrace ¶
func (t *GocoreTraceService) NewTrace() *contract.TraceContext
NewTrace 生成新的跟踪
func (*GocoreTraceService) SetSpanIDService ¶
func (t *GocoreTraceService) SetSpanIDService(service contract.IDService)
func (*GocoreTraceService) SetTraceIDService ¶
func (t *GocoreTraceService) SetTraceIDService(service contract.IDService)
func (*GocoreTraceService) StartSpan ¶
func (t *GocoreTraceService) StartSpan(tc *contract.TraceContext) *contract.TraceContext
func (*GocoreTraceService) ToMap ¶
func (t *GocoreTraceService) ToMap(tc *contract.TraceContext) map[string]string
func (*GocoreTraceService) WithTrace ¶
func (t *GocoreTraceService) WithTrace(c context.Context, trace *contract.TraceContext) context.Context
Click to show internal directories.
Click to hide internal directories.