trace

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = TraceKey("trace-key")

Functions

func NewJadeTraceService

func NewJadeTraceService(params ...interface{}) (interface{}, error)

Types

type JadeTraceProvider

type JadeTraceProvider struct {
	// contains filtered or unexported fields
}

func (*JadeTraceProvider) Boot

func (provider *JadeTraceProvider) Boot(c framework.Container) error

Boot will called when the service instantiate

func (*JadeTraceProvider) IsDefer

func (provider *JadeTraceProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*JadeTraceProvider) Name

func (provider *JadeTraceProvider) Name() string

/ Name define the name for this service

func (*JadeTraceProvider) Params

func (provider *JadeTraceProvider) Params(c framework.Container) []interface{}

Params define the necessary params for NewInstance

func (*JadeTraceProvider) Register

Register registe a new function for make a service instance

type JadeTraceService

type JadeTraceService struct {
	contract.Trace
	// contains filtered or unexported fields
}

func (*JadeTraceService) ExtractHTTP

func (t *JadeTraceService) ExtractHTTP(req *http.Request) *contract.TraceContext

GetTrace By Http

func (*JadeTraceService) GetTrace

GetTrace From trace context

func (*JadeTraceService) InjectHTTP

func (t *JadeTraceService) InjectHTTP(req *http.Request, tc *contract.TraceContext) *http.Request

Set Trace to Http

func (*JadeTraceService) NewTrace

func (t *JadeTraceService) NewTrace() *contract.TraceContext

NewTrace generate a new trace

func (*JadeTraceService) StartSpan

StartSpan generate cspan for child call

func (*JadeTraceService) ToMap

func (*JadeTraceService) WithTrace

WithContext register new trace to context

type TraceKey

type TraceKey string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL