mqtt5

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package mqtt5 provides a communication protocol binding implementation using the MQTT v5 pub-sub messaging protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mqtt5Binding

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

Mqtt5Binding realizes a communication protocol binding for MQTT v5 by implementing the communication API interface api.Api.

func (*Mqtt5Binding) ClientId

func (b *Mqtt5Binding) ClientId() string

ClientId returns the MQTT client ID used to connect to the broker (exposed for testing purposes).

func (*Mqtt5Binding) Close

func (b *Mqtt5Binding) Close() (done <-chan struct{})

Close implements the api.Api interface.

func (*Mqtt5Binding) Open

func (b *Mqtt5Binding) Open(cfg *config.Config, timeout time.Duration) <-chan error

Open implements the api.Api interface.

func (*Mqtt5Binding) PublishAction

func (b *Mqtt5Binding) PublishAction(ctx context.Context, action api.Action, scope ...api.Scope) (results <-chan api.ActionResult, err error)

PublishAction implements the api.Api interface.

func (*Mqtt5Binding) PublishEvent

func (b *Mqtt5Binding) PublishEvent(event api.Event, scope ...api.Scope) error

PublishEvent implements the api.Api interface.

func (*Mqtt5Binding) PublishQuery

func (b *Mqtt5Binding) PublishQuery(ctx context.Context, query api.Query, scope ...api.Scope) (results <-chan api.QueryResult, err error)

PublishQuery implements the api.Api interface.

func (*Mqtt5Binding) SubscribeAction

func (b *Mqtt5Binding) SubscribeAction(ctx context.Context, filter api.SubscriptionFilter) (actions <-chan api.ActionWithCallback, err error)

SubscribeAction implements the api.Api interface.

func (*Mqtt5Binding) SubscribeEvent

func (b *Mqtt5Binding) SubscribeEvent(ctx context.Context, filter api.SubscriptionFilter) (events <-chan api.Event, err error)

SubscribeEvent implements the api.Api interface.

func (*Mqtt5Binding) SubscribeQuery

func (b *Mqtt5Binding) SubscribeQuery(ctx context.Context, filter api.SubscriptionFilter) (queries <-chan api.QueryWithCallback, err error)

SubscribeQuery implements the api.Api interface.

Jump to

Keyboard shortcuts

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