Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SoftwareDirectory string `yaml:"softwareDirectory"` Mqtt struct { URL string `yaml:"url"` Username string `yaml:"username"` Password string `yaml:"password"` Topics struct { Advertise string `yaml:"advertise"` Report string `yaml:"report"` Upgrade string `yaml:"upgrade"` } } `yaml:"mqtt"` }
type Index ¶
type Index struct { Entries map[string][]*semver.Version C chan bool // contains filtered or unexported fields }
Index contains OTA software by type and by version.
func (*Index) WatchDirectory ¶
func (i *Index) WatchDirectory()
WatchDirectory watches the directory associated with the Index.
type Upgrade ¶
type Upgrade struct {
// contains filtered or unexported fields
}
An Upgrade is a representation of a upgrade job to be completed.
type Upgrader ¶
type Upgrader struct { Config Config // contains filtered or unexported fields }
Upgrader manages message
func NewUpgrader ¶
NewUpgrader instantiates an Upgrader object.
func (*Upgrader) HandleVersionMessage ¶
func (u *Upgrader) HandleVersionMessage(client mqtt.Client, msg mqtt.Message)
HandleVersionMessage handles an iotp version message over MQTT.
Click to show internal directories.
Click to hide internal directories.