bootstrap

package
v1.0.30 Latest Latest
Warning

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

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

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