Versions in this module Expand all Collapse all v1 v1.1.1 Feb 25, 2021 Changes in this version + const BinaryProtocol + const CatError + const CatSuccess + const ReadableProtocol + type BinaryEncoder struct + func NewBinaryEncoder() *BinaryEncoder + func (e *BinaryEncoder) EncodeEvent(buf *bytes.Buffer, m *Event) (err error) + func (e *BinaryEncoder) EncodeHeader(buf *bytes.Buffer, header *Header) (err error) + func (e *BinaryEncoder) EncodeHeartbeat(buf *bytes.Buffer, m *Heartbeat) (err error) + func (e *BinaryEncoder) EncodeMessage(buf *bytes.Buffer, message Messager) (err error) + func (e *BinaryEncoder) EncodeMetric(buf *bytes.Buffer, m *Metric) (err error) + func (e *BinaryEncoder) EncodeTransaction(buf *bytes.Buffer, trans *Transaction) (err error) + type Encoder interface + EncodeEvent func(*bytes.Buffer, *Event) error + EncodeHeader func(*bytes.Buffer, *Header) error + EncodeHeartbeat func(*bytes.Buffer, *Heartbeat) error + EncodeMessage func(*bytes.Buffer, Messager) error + EncodeMetric func(*bytes.Buffer, *Metric) error + EncodeTransaction func(*bytes.Buffer, *Transaction) error + type Event struct + func NewEvent(mType, name string, flush Flush) *Event + func (e *Event) Complete() + type Flush func(m Messager) + type Header struct + Domain string + Hostname string + Ip string + MessageId string + ParentMessageId string + RootMessageId string + type Heartbeat struct + func NewHeartbeat(mType, name string, flush Flush) *Heartbeat + func (e *Heartbeat) Complete() + type Message struct + Name string + Status string + Type string + func NewMessage(mType, name string, flush Flush) Message + func (m *Message) AddData(k string, v ...string) + func (m *Message) Complete() + func (m *Message) GetData() *bytes.Buffer + func (m *Message) GetMessageId() string + func (m *Message) GetName() string + func (m *Message) GetParentMessageId() string + func (m *Message) GetRootMessageId() string + func (m *Message) GetStatus() string + func (m *Message) GetTime() time.Time + func (m *Message) GetType() string + func (m *Message) SetData(v string) + func (m *Message) SetStatus(status string) + func (m *Message) SetSuccessStatus() + func (m *Message) SetTime(t time.Time) + type MessageGetter interface + GetData func() *bytes.Buffer + GetName func() string + GetStatus func() string + GetTime func() time.Time + GetType func() string + type Messager interface + AddData func(k string, v ...string) + Complete func() + GetMessageId func() string + GetParentMessageId func() string + GetRootMessageId func() string + SetData func(v string) + SetStatus func(status string) + SetTime func(time time.Time) + type Metric struct + func NewMetric(mType, name string, flush Flush) *Metric + func (e *Metric) Complete() + type NullMessage struct + func (m *NullMessage) AddData(k string, v ...string) + func (m *NullMessage) Complete() + func (m *NullMessage) GetData() *bytes.Buffer + func (m *NullMessage) GetMessageId() string + func (m *NullMessage) GetName() string + func (m *NullMessage) GetParentMessageId() string + func (m *NullMessage) GetRootMessageId() string + func (m *NullMessage) GetStatus() string + func (m *NullMessage) GetTime() time.Time + func (m *NullMessage) GetType() string + func (m *NullMessage) SetData(v string) + func (m *NullMessage) SetStatus(status string) + func (m *NullMessage) SetTime(time time.Time) + func (m *NullMessage) SetTimestamp(timestampMs int64) + type NullTransaction struct + func (t *NullTransaction) AddChild(m Messager) + func (t *NullTransaction) GetChildren() []Messager + func (t *NullTransaction) GetDuration() time.Duration + func (t *NullTransaction) LogEvent(mtype, name string, args ...string) + func (t *NullTransaction) NewEvent(mtype, name string) Messager + func (t *NullTransaction) SetDuration(duration time.Duration) + func (t *NullTransaction) SetDurationStart(duration time.Time) + func (t *NullTransaction) SetMessageId(messageId string) + func (t *NullTransaction) SetParentMessageId(parentMessageId string) + func (t *NullTransaction) SetRootMessageId(rootMessageId string) + type Transaction struct + func NewTransaction(mType, name string, flush Flush) *Transaction + func (t *Transaction) AddChild(m Messager) + func (t *Transaction) Complete() + func (t *Transaction) GetChildren() []Messager + func (t *Transaction) GetDuration() time.Duration + func (t *Transaction) LogEvent(mtype, name string, args ...string) + func (t *Transaction) NewEvent(mtype, name string) Messager + func (t *Transaction) SetDuration(duration time.Duration) + func (t *Transaction) SetDurationStart(time time.Time) + func (t *Transaction) SetMessageId(messageId string) + func (t *Transaction) SetParentMessageId(parentMessageId string) + func (t *Transaction) SetRootMessageId(rootMessageId string) + type TransactionGetter interface + GetDuration func() time.Duration + type Transactor interface + AddChild func(m Messager) + GetChildren func() []Messager + LogEvent func(mType, name string, args ...string) + NewEvent func(mType, name string) Messager + SetDuration func(duration time.Duration) + SetDurationStart func(time time.Time) + SetMessageId func(messageId string) + SetParentMessageId func(parentMessageId string) + SetRootMessageId func(rootMessageId string)