bootstrap

package
v1.0.41 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mqtt5ClientMapName = di.TypeInstanceToName((*Mqtt5ClientMap)(nil))

Mqtt5ClientMapName contains the name of the Mqtt5ClientMap struct in the DIC.

Functions

func Mqtt5BootstrapHandler

func Mqtt5BootstrapHandler(ctx context.Context, wg *sync.WaitGroup, startupTimer startup.Timer, dic *di.Container) bool

Mqtt5BootstrapHandler fulfills the BootstrapHandler contract. It creates and initializes the MQTT 5 clients and adds the MQTT 5 client map to the DIC

Types

type Mqtt5ClientMap

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

func Mqtt5ClientMapFrom

func Mqtt5ClientMapFrom(get di.Get) *Mqtt5ClientMap

Mqtt5ClientMapFrom helper function queries the DIC and returns Mqtt5ClientMap implementation.

func NewMqtt5ClientMap added in v1.0.1

func NewMqtt5ClientMap() Mqtt5ClientMap

NewMqtt5ClientMap create, initializes and returns new instance of Mqtt5ClientMap

func (*Mqtt5ClientMap) ConnectAll

func (mc *Mqtt5ClientMap) ConnectAll(logger log.Logger) error

ConnectAll establishes all the connections to a MQTT server.

func (*Mqtt5ClientMap) DisconnectAll

func (mc *Mqtt5ClientMap) DisconnectAll(logger log.Logger) error

DisconnectAll closes all the connections to the connected MQTT server.

func (*Mqtt5ClientMap) Get

func (mc *Mqtt5ClientMap) Get(brokerName string) (mqtt5.MessageClient, error)

Get the specific client from Mqtt5ClientMap

func (*Mqtt5ClientMap) Put added in v1.0.1

func (mc *Mqtt5ClientMap) Put(brokerName string, c mqtt5.MessageClient)

Put new or updated client into Mqtt5ClientMap

Jump to

Keyboard shortcuts

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