kratos: github.com/bilibili/kratos/pkg/net/trace/mocktrace Index | Files

package mocktrace

import "github.com/bilibili/kratos/pkg/net/trace/mocktrace"

Index

Package Files

mocktrace.go

type MockSpan Uses

type MockSpan struct {
    *MockTrace
    OperationName string
    FinishErr     error
    Finished      bool
    Tags          []trace.Tag
    Logs          []trace.LogField
}

MockSpan .

func (*MockSpan) Finish Uses

func (m *MockSpan) Finish(perr *error)

Finish .

func (*MockSpan) Follow Uses

func (m *MockSpan) Follow(serviceName string, operationName string) trace.Trace

Follow .

func (*MockSpan) Fork Uses

func (m *MockSpan) Fork(serviceName string, operationName string) trace.Trace

Fork .

func (*MockSpan) SetLog Uses

func (m *MockSpan) SetLog(logs ...trace.LogField) trace.Trace

SetLog .

func (*MockSpan) SetTag Uses

func (m *MockSpan) SetTag(tags ...trace.Tag) trace.Trace

SetTag .

func (*MockSpan) SetTitle Uses

func (m *MockSpan) SetTitle(title string)

SetTitle .

func (*MockSpan) TraceID Uses

func (m *MockSpan) TraceID() string

TraceID .

func (*MockSpan) Visit Uses

func (m *MockSpan) Visit(fn func(k, v string))

Visit .

type MockTrace Uses

type MockTrace struct {
    Spans []*MockSpan
}

MockTrace .

func (*MockTrace) Extract Uses

func (m *MockTrace) Extract(format interface{}, carrier interface{}) (trace.Trace, error)

Extract .

func (*MockTrace) Inject Uses

func (m *MockTrace) Inject(t trace.Trace, format interface{}, carrier interface{}) error

Inject .

func (*MockTrace) New Uses

func (m *MockTrace) New(operationName string, opts ...trace.Option) trace.Trace

New .

Package mocktrace imports 1 packages (graph). Updated 2019-05-04. Refresh now. Tools for package owners.