pb

package
v0.0.0-...-1d9596f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Name              string   `json:"name,omitempty"`
	Scope             []string `json:"scope,omitempty"`
	TimestampOffsetNs int64    `json:"timestamp_offset_ns,omitempty"`
	Tags              []*Tag   `json:"tags,omitempty"`
}

func (*Event) Decode

func (m *Event) Decode(c *picobuf.Decoder)

func (*Event) Encode

func (m *Event) Encode(c *picobuf.Encoder) bool

func (*Event) TagsString

func (e *Event) TagsString() string

type Packet

type Packet struct {
	Application        string     `json:"application,omitempty"`
	ApplicationVersion string     `json:"application_version,omitempty"`
	Instance           string     `json:"instance,omitempty"`
	StartTimestamp     *Timestamp `json:"start_timestamp,omitempty"`
	SendOffsetNs       int64      `json:"send_offset_ns,omitempty"`
	Events             []*Event   `json:"events,omitempty"`
}

func (*Packet) Decode

func (m *Packet) Decode(c *picobuf.Decoder)

func (*Packet) Encode

func (m *Packet) Encode(c *picobuf.Encoder) bool

type Record

type Record struct {
	Application           string     `json:"application,omitempty"`
	ApplicationVersion    string     `json:"application_version,omitempty"`
	Instance              string     `json:"instance,omitempty"`
	SourceAddr            string     `json:"source_addr,omitempty"`
	Timestamp             *Timestamp `json:"timestamp,omitempty"`
	TimestampCorrectionNs int64      `json:"timestamp_correction_ns,omitempty"`
	Tags                  []*Tag     `json:"tags,omitempty"`
}

func (*Record) Decode

func (m *Record) Decode(c *picobuf.Decoder)

func (*Record) Encode

func (m *Record) Encode(c *picobuf.Encoder) bool

type Tag

type Tag struct {
	Key   string `json:"key,omitempty"`
	Value isTag_Value
}

func (*Tag) Decode

func (m *Tag) Decode(c *picobuf.Decoder)

func (*Tag) Encode

func (m *Tag) Encode(c *picobuf.Encoder) bool

func (*Tag) KVString

func (tag *Tag) KVString() string

func (*Tag) ValueString

func (tag *Tag) ValueString() string

type Tag_Bool

type Tag_Bool struct {
	Bool bool
}

type Tag_Bytes

type Tag_Bytes struct {
	Bytes []byte
}

type Tag_Double

type Tag_Double struct {
	Double float64
}

type Tag_DurationNs

type Tag_DurationNs struct {
	DurationNs int64
}

type Tag_Int64

type Tag_Int64 struct {
	Int64 int64
}

type Tag_String_

type Tag_String_ struct {
	String_ []byte
}

type Tag_Timestamp

type Tag_Timestamp struct {
	Timestamp *Timestamp
}

type Timestamp

type Timestamp struct {
	Seconds int64 `json:"seconds,omitempty"`
	Nanos   int32 `json:"nanos,omitempty"`
}

func AsTimestamp

func AsTimestamp(t time.Time) *Timestamp

func (*Timestamp) AsTime

func (t *Timestamp) AsTime() time.Time

func (*Timestamp) Decode

func (m *Timestamp) Decode(c *picobuf.Decoder)

func (*Timestamp) Encode

func (m *Timestamp) Encode(c *picobuf.Encoder) bool

Jump to

Keyboard shortcuts

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