mqtt

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(cfg *mqtt.ClientOptions, logger log.Logger) (mq.Consumer, error)

func NewProducer

func NewProducer(cfg *mqtt.ClientOptions) (mq.Producer, error)

Types

type ConsumerImpl

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

func (*ConsumerImpl) Close

func (x *ConsumerImpl) Close(ctx context.Context) error

func (*ConsumerImpl) Subscribe

func (x *ConsumerImpl) Subscribe(ctx context.Context, topic string, channel string) (<-chan mq.Message, error)

type ProducerImpl

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

func (*ProducerImpl) Close

func (x *ProducerImpl) Close(ctx context.Context) error

func (*ProducerImpl) Publish

func (x *ProducerImpl) Publish(ctx context.Context, topic string, message mq.Message) error

Jump to

Keyboard shortcuts

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