lib

package
v0.0.0-...-3a1ea35 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectHandler paho.OnConnectHandler = func(client paho.Client) {
	log.Println("Connected")
	opts := client.OptionsReader()
	topic := opts.ClientID()
	token := client.Subscribe(topic, 1, nil)
	token.Wait()
	log.Printf("Subscribed as %v\n", topic)
}
View Source
var ConnectLostHandler paho.ConnectionLostHandler = func(client paho.Client, err error) {
	log.Printf("Connect lost: %v\n", err)
}
View Source
var MessagePubHandler paho.MessageHandler = func(client paho.Client, msg paho.Message) {
	log.Printf("Received %s for %s\n", msg.Payload(), msg.Topic())
	fmt.Printf("\a")
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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