Documentation ¶
Index ¶
Constants ¶
View Source
const ( DeviceETPrefix = "$hw/events/device/" TwinETUpdateSuffix = "/twin/update" TwinETUpdateDeltaSuffix = "/twin/update/delta" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Type string `yaml:"type"` Model string `yaml:"model"` Launcher string `yaml:"launchers"` MQTT MQTT `yaml:"broker"` Path string `yaml:"sourcepath"` DeviceID string `yaml:"DeviceID"` // Channel used to kill a running app Stop chan string // contains filtered or unexported fields }
Device Type
func (*Device) GetConfigFromFile ¶
Function used to parse a yaml file to a Device configuration
type MQTT ¶
type MQTT struct { BrokerHost string `yaml:"host"` BrokerPort string `yaml:"port"` Topic string `yaml:"topic"` Client mqtt.Client ID string Action func(mqtt.Message, mqtt.Client, string) }
func (*MQTT) MqttHandlerJSON ¶
Action made when the device receive a message from the specified Topic
Click to show internal directories.
Click to hide internal directories.