mqtt

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mqtt

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

func NewMqtt

func NewMqtt(lc fx.Lifecycle, cfg *MqttConfig) (mqtt *Mqtt)

func (*Mqtt) NewClient

func (m *Mqtt) NewClient(cfg *mqtt_client.Config) (c *mqtt_client.Client, err error)

func (*Mqtt) Shutdown

func (m *Mqtt) Shutdown() error

func (*Mqtt) Start added in v0.1.0

func (m *Mqtt) Start() error

type MqttConfig

type MqttConfig struct {
	KeepAlive        int
	ConnectTimeout   int
	SessionsProvider string
	MqttUsername     string
	MqttPassword     string
	TopicsProvider   string
	Port             int
	ServerIp         string
	MqttClientId     string
}

func NewMqttConfig

func NewMqttConfig(cfg *config.AppConfig) *MqttConfig

Jump to

Keyboard shortcuts

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