Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MQTTQOSOne is a constant representing QOS level 1 when publishing. MQTTQOSOne = byte(1) )
Variables ¶
View Source
var ( // ErrPublishTimeout should only happen if the broker is unresponsive. ErrPublishTimeout = errors.New("mqtt publish timed out") )
Functions ¶
This section is empty.
Types ¶
type MQTTOptions ¶
type MQTTOptions struct { Topic string Telemetry string Broker string ClientID string TLSKeyFile string TLSCertFile string }
MQTTOptions controls how the internal mqtt client is created.
type MQTTPublisher ¶
type MQTTPublisher struct {
// contains filtered or unexported fields
}
MQTTPublisher knows how to Publish a collect.Msg to a given topic on its connected broker.
func NewMQTT ¶
func NewMQTT(o MQTTOptions) *MQTTPublisher
NewMQTT creates an MQTTPublisher from the given options.
Click to show internal directories.
Click to hide internal directories.