Documentation ¶
Index ¶
- func CreateProbeEventMsg(event *ProbeEvent, id int64, version Format) ([]byte, error)
- func CreateProbeEventsMsg(events []*ProbeEvent) ([]byte, error)
- type Format
- type ProbeEvent
- func (z *ProbeEvent) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ProbeEvent) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ProbeEvent) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ProbeEvent) Msgsize() (s int)
- func (z *ProbeEvent) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (e *ProbeEvent) Validate() error
- type ProbeEventJson
- func (z *ProbeEventJson) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ProbeEventJson) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ProbeEventJson) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ProbeEventJson) Msgsize() (s int)
- func (z *ProbeEventJson) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ProbeEvents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProbeEventMsg ¶
func CreateProbeEventMsg(event *ProbeEvent, id int64, version Format) ([]byte, error)
func CreateProbeEventsMsg ¶
func CreateProbeEventsMsg(events []*ProbeEvent) ([]byte, error)
Types ¶
type Format ¶
type Format uint8
func (Format) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type ProbeEvent ¶
type ProbeEvent struct { Id string `json:"id"` EventType string `json:"event_type"` OrgId int64 `json:"org_id"` Severity string `json:"severity"` // enum "INFO" "WARN" "ERROR" "OK" Source string `json:"source"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` Tags map[string]string `json:"tags"` }
func ProbeEventsFromMsg ¶
func ProbeEventsFromMsg(msg []byte) ([]*ProbeEvent, error)
Decode message into probeEvent. The message Format is:
Bytes: Description 0 : messgae format 1-9 : transmit timestamp 64bit Nanosecond Epoch TS (not used) 10-> : message body
func (*ProbeEvent) DecodeMsg ¶
func (z *ProbeEvent) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ProbeEvent) EncodeMsg ¶
func (z *ProbeEvent) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ProbeEvent) MarshalMsg ¶
func (z *ProbeEvent) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ProbeEvent) Msgsize ¶
func (z *ProbeEvent) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ProbeEvent) UnmarshalMsg ¶
func (z *ProbeEvent) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (*ProbeEvent) Validate ¶
func (e *ProbeEvent) Validate() error
type ProbeEventJson ¶
type ProbeEventJson struct { Id string `json:"id"` EventType string `json:"event_type"` OrgId int64 `json:"org_id"` Severity string `json:"severity"` Source string `json:"source"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` Tags []string `json:"tags"` }
func (*ProbeEventJson) DecodeMsg ¶
func (z *ProbeEventJson) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ProbeEventJson) EncodeMsg ¶
func (z *ProbeEventJson) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ProbeEventJson) MarshalMsg ¶
func (z *ProbeEventJson) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ProbeEventJson) Msgsize ¶
func (z *ProbeEventJson) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ProbeEventJson) UnmarshalMsg ¶
func (z *ProbeEventJson) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ProbeEvents ¶
type ProbeEvents []*ProbeEvent
func (*ProbeEvents) DecodeMsg ¶
func (z *ProbeEvents) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (ProbeEvents) EncodeMsg ¶
func (z ProbeEvents) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (ProbeEvents) MarshalMsg ¶
func (z ProbeEvents) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ProbeEvents) Msgsize ¶
func (z ProbeEvents) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ProbeEvents) UnmarshalMsg ¶
func (z *ProbeEvents) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler