common

package
v0.0.0-...-f29557b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TokenWaitTime to wait
	TokenWaitTime = 120 * time.Second
)

Functions

func CheckClientToken

func CheckClientToken(token MQTT.Token) (bool, error)

CheckClientToken checks token is right

func HubClientInit

func HubClientInit(server, clientID, username, password string) *MQTT.ClientOptions

func LoopConnect

func LoopConnect(clientID string, client MQTT.Client)

LoopConnect connect to mqtt server

Types

type MqttMode

type MqttMode int
const (
	MqttModeInternal MqttMode = 0
	MqttModeBoth     MqttMode = 1
	MqttModeExternal MqttMode = 2
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL