wire - ActiveState ActiveGo 1.8

Package wire

import "github.com/openzipkin/zipkin-go-opentracing/wire"

Overview ▾

Package wire is a generated protocol buffer package.

It is generated from these files:


It has these top-level messages:



var (
    ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowWire   = fmt.Errorf("proto: integer overflow")

type ProtobufCarrier

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.

type ProtobufCarrier TracerState

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(traceID types.TraceID, spanID uint64, parentSpanID *uint64, sampled bool, flags flag.Flags)

SetState set's the tracer state.

func (*ProtobufCarrier) State

func (p *ProtobufCarrier) State() (traceID types.TraceID, spanID uint64, parentSpanID *uint64, sampled bool, flags flag.Flags)

State returns the tracer state.

type TracerState

type TracerState struct {
    TraceId      uint64            `protobuf:"fixed64,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
    SpanId       uint64            `protobuf:"fixed64,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
    Sampled      bool              `protobuf:"varint,3,opt,name=sampled,proto3" json:"sampled,omitempty"`
    BaggageItems map[string]string `protobuf:"bytes,4,rep,name=baggage_items,json=baggageItems" json:"baggage_items,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    TraceIdHigh  uint64            `protobuf:"fixed64,20,opt,name=trace_id_high,json=traceIdHigh,proto3" json:"trace_id_high,omitempty"`
    ParentSpanId uint64            `protobuf:"fixed64,21,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
    Flags        uint64            `protobuf:"fixed64,22,opt,name=flags,proto3" json:"flags,omitempty"`

func (*TracerState) Descriptor

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

func (*TracerState) GetBaggageItems

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

func (*TracerState) GetFlags

func (m *TracerState) GetFlags() uint64

func (*TracerState) GetParentSpanId

func (m *TracerState) GetParentSpanId() uint64

func (*TracerState) GetSampled

func (m *TracerState) GetSampled() bool

func (*TracerState) GetSpanId

func (m *TracerState) GetSpanId() uint64

func (*TracerState) GetTraceId

func (m *TracerState) GetTraceId() uint64

func (*TracerState) GetTraceIdHigh

func (m *TracerState) GetTraceIdHigh() uint64

func (*TracerState) Marshal

func (m *TracerState) Marshal() (dAtA []byte, err error)

func (*TracerState) MarshalTo

func (m *TracerState) MarshalTo(dAtA []byte) (int, error)

func (*TracerState) ProtoMessage

func (*TracerState) ProtoMessage()

func (*TracerState) Reset

func (m *TracerState) Reset()

func (*TracerState) Size

func (m *TracerState) Size() (n int)

func (*TracerState) String

func (m *TracerState) String() string

func (*TracerState) Unmarshal

func (m *TracerState) Unmarshal(dAtA []byte) error