protocol

package
v0.0.0-...-8c118da Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadRaw

func ReadRaw(rawMsg msgp.Raw) string

ReadRaw transforms raw message pack bytes to string

Types

type FluentMsg

type FluentMsg struct {
	Tag    msgp.Raw
	Time   int64
	Record FluentRecord
	Option map[string]interface{}
}

FluentMsg is a single Message Event of Forward protocol

func (*FluentMsg) Msgsize

func (z *FluentMsg) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*FluentMsg) UnmarshalMsg

func (z *FluentMsg) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type FluentRawMsg

type FluentRawMsg struct {
	Tag    msgp.Raw
	Time   msgp.Raw
	Record msgp.Raw
	Option msgp.Raw
}

FluentRawMsg uses raw byte buffers for efficient caching and zero allocations in unmarshalling

func (*FluentRawMsg) DecodeMsg

func (z *FluentRawMsg) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*FluentRawMsg) MarshalMsg

func (z *FluentRawMsg) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*FluentRawMsg) Msgsize

func (z *FluentRawMsg) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

type FluentRecord

type FluentRecord struct {
	//ContainerId   string `msg:"container_id"`
	ContainerName msgp.Raw `msg:"container_name"`
	Log           msgp.Raw `msg:"log"`
}

FluentRecord is a subset of record hash such as: - Unmapped fields are ignored - Using 'raw' to avoid allocations

func (*FluentRecord) DecodeMsg

func (z *FluentRecord) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*FluentRecord) EncodeMsg

func (z *FluentRecord) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*FluentRecord) MarshalMsg

func (z *FluentRecord) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*FluentRecord) Msgsize

func (z *FluentRecord) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*FluentRecord) UnmarshalMsg

func (z *FluentRecord) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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