mqtt_client

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MqttConsumer

type MqttConsumer struct {
	Id         int
	Connection mqtt.Client
	Topic      string
	Config     config.Config
}

func NewConsumer

func NewConsumer(cfg config.Config, id int) *MqttConsumer

func (MqttConsumer) Start

func (c MqttConsumer) Start(ctx context.Context, subscribed chan bool)

func (MqttConsumer) Stop added in v0.3.0

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 NewPublisher

func NewPublisher(cfg config.Config, n int) *MqttPublisher

func (MqttPublisher) Send added in v0.2.0

func (p MqttPublisher) Send()

func (MqttPublisher) Start

func (p MqttPublisher) Start(ctx context.Context)

func (MqttPublisher) StartFullSpeed

func (p MqttPublisher) StartFullSpeed(ctx context.Context)

func (MqttPublisher) StartRateLimited

func (p MqttPublisher) StartRateLimited(ctx context.Context)

func (MqttPublisher) Stop added in v0.3.0

func (p MqttPublisher) Stop(reason string)

Jump to

Keyboard shortcuts

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