Documentation ¶
Index ¶
- Constants
- func FreeTCPPort() (int, error)
- func Hostname(port int) (string, error)
- func Random(min, max int) int
- func Random16Bytes() [16]byte
- func Random2Bytes() [2]byte
- func Random4Bytes() [4]byte
- func Random64(min, max int64) int64
- func Random8Bytes() [8]byte
- func RandomBytes(nb int) []byte
- func RandomDuration(min, max time.Duration) time.Duration
- type Mqtt
Constants ¶
View Source
const ( MqttLorhammerTopic = "/lorhammer" MqttOrchestratorTopic = "/lorhammer/orchestrator" )
Channels mqtt to use
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
RandomBytes generate random int64 between min and max
Types ¶
type Mqtt ¶
type Mqtt interface { Connect() error Disconnect() GetAddress() string Handle(topics []string, handle func(message []byte)) error HandleCmd(topics []string, handle func(cmd model.CMD)) error PublishCmd(topic string, cmdName model.CommandName) error PublishSubCmd(topic string, cmdName model.CommandName, subCmd interface{}) error }
Mqtt is responsible of communication with the mqtt server
Click to show internal directories.
Click to hide internal directories.