wire

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtobufCarrier

type ProtobufCarrier TracerState

ProtobufCarrier is a DelegatingCarrier that uses protocol buffers as the the underlying datastructure. The reason for implementing DelagatingCarrier is to allow for end users to serialize the underlying protocol buffers using jsonpb or any other serialization forms they want.

func (*ProtobufCarrier) GetBaggage

func (p *ProtobufCarrier) GetBaggage(f func(k, v string))

GetBaggage iterates over each baggage item and executes the callback with the key:value pair.

func (*ProtobufCarrier) SetBaggageItem

func (p *ProtobufCarrier) SetBaggageItem(key, value string)

SetBaggageItem sets a baggage item.

func (*ProtobufCarrier) SetState

func (p *ProtobufCarrier) SetState(traceIDHi, traceIDLo, spanID uint64, sampled bool)

SetState set's the tracer state.

func (*ProtobufCarrier) State

func (p *ProtobufCarrier) State() (traceIDHi, traceIDLo, spanID uint64, sampled bool)

State returns the tracer state.

type TracerState

type TracerState struct {
	TraceIdHi            uint64            `protobuf:"fixed64,1,opt,name=trace_id_hi,json=traceIdHi,proto3" json:"trace_id_hi,omitempty"`
	TraceIdLo            uint64            `protobuf:"fixed64,2,opt,name=trace_id_lo,json=traceIdLo,proto3" json:"trace_id_lo,omitempty"`
	SpanId               uint64            `protobuf:"fixed64,3,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	Sampled              bool              `protobuf:"varint,4,opt,name=sampled,proto3" json:"sampled,omitempty"`
	BaggageItems         map[string]string `` /* 185-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*TracerState) Descriptor

func (*TracerState) Descriptor() ([]byte, []int)

func (*TracerState) GetBaggageItems

func (m *TracerState) GetBaggageItems() map[string]string

func (*TracerState) GetSampled added in v0.3.0

func (m *TracerState) GetSampled() bool

func (*TracerState) GetSpanId added in v0.3.0

func (m *TracerState) GetSpanId() uint64

func (*TracerState) GetTraceIdHi added in v0.3.0

func (m *TracerState) GetTraceIdHi() uint64

func (*TracerState) GetTraceIdLo added in v0.3.0

func (m *TracerState) GetTraceIdLo() uint64

func (*TracerState) ProtoMessage

func (*TracerState) ProtoMessage()

func (*TracerState) Reset

func (m *TracerState) Reset()

func (*TracerState) String

func (m *TracerState) String() string

func (*TracerState) XXX_DiscardUnknown added in v0.3.0

func (m *TracerState) XXX_DiscardUnknown()

func (*TracerState) XXX_Marshal added in v0.3.0

func (m *TracerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TracerState) XXX_Merge added in v0.3.0

func (m *TracerState) XXX_Merge(src proto.Message)

func (*TracerState) XXX_Size added in v0.3.0

func (m *TracerState) XXX_Size() int

func (*TracerState) XXX_Unmarshal added in v0.3.0

func (m *TracerState) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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