mqtt

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Start(chan bool)
}

func NewConsumer

func NewConsumer(ctx context.Context, cfg config.Config, id int) Consumer

type Mqtt5Consumer

type Mqtt5Consumer struct {
	Id         int
	Connection *autopaho.ConnectionManager
	Topic      string
	Config     config.Config
	// contains filtered or unexported fields
}

func NewMqtt5Consumer

func NewMqtt5Consumer(ctx context.Context, cfg config.Config, id int) Mqtt5Consumer

func (Mqtt5Consumer) Start

func (c Mqtt5Consumer) Start(consumerReady chan bool)

func (Mqtt5Consumer) Stop

func (c Mqtt5Consumer) Stop(reason string)

type Mqtt5Publisher

type Mqtt5Publisher struct {
	Id         int
	Connection *autopaho.ConnectionManager
	Topic      string
	Config     config.Config
	// contains filtered or unexported fields
}

func NewMqtt5Publisher

func NewMqtt5Publisher(ctx context.Context, cfg config.Config, id int) Mqtt5Publisher

func (*Mqtt5Publisher) Connect

func (p *Mqtt5Publisher) Connect()

func (Mqtt5Publisher) Send

func (p Mqtt5Publisher) Send()

func (Mqtt5Publisher) Start

func (p Mqtt5Publisher) Start(publisherReady chan bool, startPublishing chan bool)

func (Mqtt5Publisher) StartPublishing added in v0.24.0

func (p Mqtt5Publisher) StartPublishing() string

func (Mqtt5Publisher) Stop

func (p Mqtt5Publisher) Stop(reason string)

type MqttConsumer

type MqttConsumer struct {
	Id         int
	Connection mqtt.Client
	Topic      string
	Config     config.Config
	// contains filtered or unexported fields
}

func NewMqttConsumer

func NewMqttConsumer(ctx context.Context, cfg config.Config, id int) MqttConsumer

func (MqttConsumer) Start

func (c MqttConsumer) Start(cosumerReady chan bool)

func (MqttConsumer) Stop

func (c MqttConsumer) Stop(reason string)

type MqttPublisher

type MqttPublisher struct {
	Id         int
	Connection mqtt.Client
	Topic      string
	Config     config.Config
	// contains filtered or unexported fields
}

func NewMqttPublisher

func NewMqttPublisher(ctx context.Context, cfg config.Config, id int) MqttPublisher

func (*MqttPublisher) Connect

func (p *MqttPublisher) Connect()

func (MqttPublisher) Send

func (p MqttPublisher) Send()

func (MqttPublisher) Start

func (p MqttPublisher) Start(publisherReady chan bool, startPublishing chan bool)

func (MqttPublisher) StartPublishing added in v0.24.0

func (p MqttPublisher) StartPublishing() string

func (MqttPublisher) Stop

func (p MqttPublisher) Stop(reason string)

type Publisher

type Publisher interface {
	Start(chan bool, chan bool)
}

func NewPublisher

func NewPublisher(ctx context.Context, cfg config.Config, id int) Publisher

Jump to

Keyboard shortcuts

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