Documentation ¶
Index ¶
Constants ¶
View Source
const CLIENT_ID = "spaceDevicesGo"
Variables ¶
This section is empty.
Functions ¶
func EnableMqttDebugLogging ¶
func EnableMqttDebugLogging()
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will fail with a fatal log if the system's secure random number generator fails to function correctly
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will fail with a fatal log if the system's secure random number generator fails to function correctly
func NewWatchDog ¶
NewWatchDog creates a new watch dog timeout - after this amount of time without a ping, the program will be killed and returns 3
Types ¶
type DeviceData ¶
type DeviceData struct {
// contains filtered or unexported fields
}
func NewDeviceData ¶
func NewDeviceData(locations []conf.Location, mqttHandler *MqttHandler, masterDb db.MasterDb, userDb db.UserDb) *DeviceData
func (*DeviceData) GetByIp ¶
func (d *DeviceData) GetByIp(ip string) (structs.WifiSession, bool)
finds the session entry for the given ip v4 or v6 address
func (*DeviceData) GetOneEntry ¶
func (d *DeviceData) GetOneEntry() []structs.WifiSession
func (*DeviceData) ListenAndUpdatePeopleData ¶
func (d *DeviceData) ListenAndUpdatePeopleData()
type MqttHandler ¶
type MqttHandler struct {
// contains filtered or unexported fields
}
func NewMqttHandler ¶
func NewMqttHandler(conf conf.MqttConf, clientOnly bool) *MqttHandler
func (*MqttHandler) GetNewDataChannel ¶
func (h *MqttHandler) GetNewDataChannel() chan []byte
func (*MqttHandler) SendPeopleAndDevices ¶
func (h *MqttHandler) SendPeopleAndDevices(data structs.PeopleAndDevices)
Click to show internal directories.
Click to hide internal directories.