issue411

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	TraceID              TraceID  `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"`
	SpanID               SpanID   `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Span) Descriptor

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

func (*Span) ProtoMessage

func (*Span) ProtoMessage()

func (*Span) Reset

func (m *Span) Reset()

func (*Span) String

func (m *Span) String() string

func (*Span) XXX_DiscardUnknown

func (m *Span) XXX_DiscardUnknown()

func (*Span) XXX_Marshal

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

func (*Span) XXX_Merge

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

func (*Span) XXX_Size

func (m *Span) XXX_Size() int

func (*Span) XXX_Unmarshal

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

type SpanID

type SpanID uint64

SpanID is a random 64bit identifier for a span

func NewSpanID

func NewSpanID(v uint64) SpanID

NewSpanID creates a new SpanID from a 64bit unsigned int.

func SpanIDFromString

func SpanIDFromString(s string) (SpanID, error)

SpanIDFromString creates a SpanID from a hexadecimal string

func (SpanID) Marshal

func (s SpanID) Marshal() ([]byte, error)

Marshal converts span ID into a binary representation. Called by protobuf serialization.

func (SpanID) MarshalJSON

func (s SpanID) MarshalJSON() ([]byte, error)

MarshalJSON converts span id into a base64 string enclosed in quotes. Used by protobuf JSON serialization. Example: {1} => "AAAAAAAAAAE=".

func (SpanID) MarshalText

func (s SpanID) MarshalText() ([]byte, error)

MarshalText is called by encoding/json, which we do not want people to use.

func (*SpanID) MarshalTo

func (s *SpanID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts span ID into a binary representation. Called by protobuf serialization.

func (*SpanID) Size

func (s *SpanID) Size() int

Size returns the size of this datum in protobuf. It is always 8 bytes.

func (SpanID) String

func (s SpanID) String() string

func (*SpanID) Unmarshal

func (s *SpanID) Unmarshal(data []byte) error

Unmarshal inflates span ID from a binary representation. Called by protobuf serialization.

func (*SpanID) UnmarshalJSON

func (s *SpanID) UnmarshalJSON(data []byte) error

UnmarshalJSON inflates span id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.

There appears to be a bug in gogoproto, as this function is only called for numeric values. https://github.com/Mother-Earth/me-protobuf/issues/411#issuecomment-393856837

func (*SpanID) UnmarshalText

func (s *SpanID) UnmarshalText(text []byte) error

UnmarshalText is called by encoding/json, which we do not want people to use.

type TraceID

type TraceID struct {
	Low  uint64 `json:"lo"`
	High uint64 `json:"hi"`
}

TraceID is a random 128bit identifier for a trace

func NewTraceID

func NewTraceID(high, low uint64) TraceID

NewTraceID creates a new TraceID from two 64bit unsigned ints.

func TraceIDFromString

func TraceIDFromString(s string) (TraceID, error)

TraceIDFromString creates a TraceID from a hexadecimal string

func (TraceID) Marshal

func (t TraceID) Marshal() ([]byte, error)

Marshal converts trace ID into a binary representation. Called by protobuf serialization.

func (TraceID) MarshalJSON

func (t TraceID) MarshalJSON() ([]byte, error)

MarshalJSON converts trace id into a base64 string enclosed in quotes. Used by protobuf JSON serialization. Example: {high:2, low:1} => "AAAAAAAAAAIAAAAAAAAAAQ==".

func (TraceID) MarshalText

func (t TraceID) MarshalText() ([]byte, error)

MarshalText is called by encoding/json, which we do not want people to use.

func (*TraceID) MarshalTo

func (t *TraceID) MarshalTo(data []byte) (n int, err error)

MarshalTo converts trace ID into a binary representation. Called by protobuf serialization.

func (*TraceID) Size

func (t *TraceID) Size() int

Size returns the size of this datum in protobuf. It is always 16 bytes.

func (TraceID) String

func (t TraceID) String() string

func (*TraceID) Unmarshal

func (t *TraceID) Unmarshal(data []byte) error

Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization.

func (*TraceID) UnmarshalJSON

func (t *TraceID) UnmarshalJSON(data []byte) error

UnmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. User by protobuf JSON serialization.

func (*TraceID) UnmarshalText

func (t *TraceID) UnmarshalText(text []byte) error

UnmarshalText is called by encoding/json, which we do not want people to use.

Jump to

Keyboard shortcuts

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