mqtt

package
v0.0.0-...-90ca592 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultMqttOutputLayer string = "mqtt"
View Source
const MaximumServiceUpdateTime = 1 * time.Second
View Source
const UnknownDevice = mqttError("unknown device")
View Source
const UnknownOutputLayer = mqttError("output layer requested could not be found")
View Source
const UnknownTopic = mqttError("unknown topic")

Variables

This section is empty.

Functions

func EmptyPublisher

func EmptyPublisher(ctx context.Context, topic string, payload []byte) error

Types

type Interface

type Interface struct {
	Publisher Publisher

	DeviceOrganiser *state.DeviceOrganiser
	GatewayMux      state.GatewayMapper
	EventSubscriber state.EventSubscriber
	OutputStack     layers.OutputStack
	DeviceInvoker   invoker.Invoker

	Logger logwrap.Logger

	PublishStateOnConnect  bool
	PublishAggregatedState bool
	PublishIndividualState bool
	// contains filtered or unexported fields
}

func (*Interface) Connected

func (i *Interface) Connected(ctx context.Context, publisher Publisher) error

func (*Interface) Disconnected

func (i *Interface) Disconnected()

func (*Interface) IncomingMessage

func (i *Interface) IncomingMessage(ctx context.Context, topic string, payload []byte) error

func (*Interface) IncomingMessageDevices

func (i *Interface) IncomingMessageDevices(ctx context.Context, topic []string, payload []byte) error

func (*Interface) IncomingMessageDevicesWith

func (i *Interface) IncomingMessageDevicesWith(ctx context.Context, topic []string, payload []byte, d da.Device) error

func (*Interface) IncomingMessageDevicesWithCapabilities

func (i *Interface) IncomingMessageDevicesWithCapabilities(ctx context.Context, topic []string, payload []byte, d da.Device) error

func (*Interface) Start

func (i *Interface) Start()

func (*Interface) Stop

func (i *Interface) Stop()

type Publisher

type Publisher func(ctx context.Context, topic string, payload []byte) error

Jump to

Keyboard shortcuts

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