jsoncodec

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationV1

type AnnotationV1 struct {
	Timestamp int64     `json:"timestamp"`
	Value     string    `json:"value"`
	Endpoint  *Endpoint `json:"endpoint"`
}

type BinaryAnnotationV1

type BinaryAnnotationV1 struct {
	Key      string      `json:"key"`
	Value    interface{} `json:"value"`
	Endpoint *Endpoint   `json:"endpoint"`
}

type Endpoint

type Endpoint struct {
	ServiceName string `json:"serviceName"`
	Ipv4        net.IP `json:"ipv4,omitempty"`
	Ipv6        net.IP `json:"ipv6,omitempty"`
	Port        uint16 `json:"port"`
}

type Id

type Id int64

func (*Id) MarshalJSON

func (id *Id) MarshalJSON() ([]byte, error)

func (*Id) UnmarshalJSON

func (id *Id) UnmarshalJSON(bytes []byte) error

type SpanV1

type SpanV1 struct {
	TraceID  Id  `json:"traceId"`
	ID       Id  `json:"id"`
	ParentID *Id `json:"parentId"`

	Annotations       []AnnotationV1       `json:"annotations"`
	BinaryAnnotations []BinaryAnnotationV1 `json:"binaryAnnotations"`

	Name string `json:"name"`

	Debug bool `json:"debug"`

	Timestamp *int64 `json:"timestamp"`
	Duration  *int64 `json:"duration"`
}

func FromSpan

func FromSpan(span *zipkincore.Span) SpanV1

func (*SpanV1) ToZipkincoreSpan

func (span *SpanV1) ToZipkincoreSpan() *zipkincore.Span

type SpanV2

type SpanV2 struct {
	TraceID  Id  `json:"traceId"`
	ID       Id  `json:"id"`
	ParentID *Id `json:"parentId"`

	Name string `json:"name"`

	Endpoint *Endpoint `json:"localEndpoint"`

	Tags map[string]string `json:"tags"`

	Kind      string `json:"kind"`
	Timestamp int64  `json:"timestamp"`
	Duration  int64  `json:"duration"`
}

func (*SpanV2) ToZipkincoreSpan

func (span *SpanV2) ToZipkincoreSpan() *zipkincore.Span

type ZipkincoreSpaner

type ZipkincoreSpaner interface {
	ToZipkincoreSpan() *zipkincore.Span
}

Jump to

Keyboard shortcuts

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