Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alarm ¶
type Alarm struct { Type string `json:"type"` Device string `json:"device,omitempty"` Message string `json:"message,omitempty"` Serverity uint `json:"serverity,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` }
The Alarm structure is meant to be a superset of all alarm message formats. The omitempty annotation will suppress marshalling unneeded fields
func (Alarm) MessageType ¶
func (alarm Alarm) MessageType() MessageType
MessageType is required to satisfy the Message interface definition
type Event ¶
type Event struct { Type string `json:"type"` Device string `json:"device,omitempty"` Message string `json:"message,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` }
The Event structure is meant to be a superset of all event message formats. The omitempty annotation will suppress marshalling unneeded fields
func (Event) MessageType ¶
func (event Event) MessageType() MessageType
MessageType is required to satisfy the Message interface definition
type Message ¶
type Message interface {
MessageType() MessageType
}
Message interface enables single functions to be used to process all types
type Metric ¶
type Metric struct { Device string `json:"device"` BytesIn uint64 `json:"bytes_in,omitempty"` BytesOut uint64 `json:"bytes_out,omitempty"` ErrorsIn uint64 `json:"errors_in,omitempty"` ErrorsOut uint64 `json:"errors_out,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` }
The Metric structure is meant to be a superset of all metric message formats. The omitempty annotation will suppress marshalling unneeded fields
func (Metric) MessageType ¶
func (metric Metric) MessageType() MessageType
MessageType is required to satisfy the Message interface definition