Documentation
¶
Index ¶
Constants ¶
View Source
const ( QueueSensorMeasurements = "sensor.all.measurements.db_writer" // could be subjected to a sensor id though QueueSensorCommandsFormat = "sensor.%s.commands" // subjected to sensor id QueueSensorRegistry = "sensor.all.registry.created" // could scale up to sensor.all.registry.notifier ?? QueueSensorLogs = "sensor.all.logs" )
Queues follow pattern: entity.id.consumer.type
View Source
const ( KeySensorMeasurements = "sensor.%s.measurements" KeySensorCommandsFormat = "sensor.%s.commands" KeySensorRegistryFormat = "sensor.%s.registry" KeySensorLogsFormat = "sensor.%s.logs" )
keys are used in consumers with wildcards and in publishers with the specific value
View Source
const (
ExchangeTopicIoT = "iot" // would be great to test as a direct exchange since it should be faster
)
Exchange
Variables ¶
View Source
var (
RabbitConnString = os.Getenv("RABBIT_CONN_STRING")
)
PubSub Broker
Functions ¶
This section is empty.
Types ¶
type SensorCommandMessage ¶
type SensorCommandMessage struct { SerialNumber string Timestamp time.Time Command string // intended for 'sleep' 'awake' 'changeSampleFrequency' Params map[string]interface{} // command specific parameters e.g. {"sampleFrequency": 1000} }
iotctl service
Click to show internal directories.
Click to hide internal directories.