mqttc

package module
v0.0.0-...-f47c463 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

README

watermill-mqtt

watermil mqtt

Documentation

Index

Constants

View Source
const (
	MQTTC_TOPIC     = "Topic"
	MQTTC_MESSAGEID = "MessageID"
	MQTTC_QOS       = "Qos"
	MQTTC_DUPLICATE = "Duplicate"
	MQTTC_RETAINED  = "Retained"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BrokerUrl string
	ClientID  string
}

type Mqttc

type Mqttc struct {
	// contains filtered or unexported fields
}

func NewMqttc

func NewMqttc(config Config, logger watermill.LoggerAdapter) (*Mqttc, error)

func (*Mqttc) Close

func (c *Mqttc) Close() error

func (*Mqttc) Publish

func (c *Mqttc) Publish(topic string, messages ...*message.Message) error

func (*Mqttc) Subscribe

func (c *Mqttc) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)

Jump to

Keyboard shortcuts

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