Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisPayload ¶
type AnalysisPayload struct {
VirtualSensorData AnalysisVirtualSensorData `json:"virtual_sensor_data"`
MemorySensorData AnalysisMemorySensorData `json:"memory_sensor_data"`
}
type Message ¶
type Message struct {
Topic MessageTopic `json:"topic"`
Payload *map[string]interface{} `json:"payload"`
Time time.Time `json:"time"`
}
func NewMessage ¶
func NewMessage(topic MessageTopic, payload any) Message
creates a new message with the given topic and payload
type MessageTopic ¶
type MessageTopic string
const ( All MessageTopic = "all" Heartbeat MessageTopic = "heartbeat" Sensor MessageTopic = "sensor" Fog MessageTopic = "edge" Cloud MessageTopic = "cloud" Analysis MessageTopic = "Analysis" )
type SensorMessage ¶
type SensorMessage struct {
// timestamp of the message
Timestamp int64 `json:"timestamp"`
// message content
Content string `json:"content"`
}
func NewSensorMessage ¶
func NewSensorMessage(content string) SensorMessage
creates a new sensor message with the given content
Click to show internal directories.
Click to hide internal directories.