mqtt

package
v3.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, server io.Server, listener net.Listener, format Format, protocol string) error

Serve serves the MQTT frontend.

Types

type Format

type Format interface {
	topics.Layout

	FromDownlink(down *ttnpb.DownlinkMessage, ids ttnpb.GatewayIdentifiers) ([]byte, error)
	ToUplink(message []byte, ids ttnpb.GatewayIdentifiers) (*ttnpb.UplinkMessage, error)
	ToStatus(message []byte, ids ttnpb.GatewayIdentifiers) (*ttnpb.GatewayStatus, error)
	ToTxAck(message []byte, ids ttnpb.GatewayIdentifiers) (*ttnpb.TxAcknowledgment, error)
}

Format formats topics, downlink, uplink and status messages.

func NewProtobuf

func NewProtobuf(ctx context.Context) Format

NewProtobuf returns a format that uses Protocol Buffers marshaling and unmarshaling.

func NewProtobufV2

func NewProtobufV2(ctx context.Context) Format

NewProtobufV2 returns a format that uses the legacy The Things Stack V2 Protocol Buffers marshaling and unmarshaling.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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