gateway

package
v0.0.0-...-2ac35d6 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(server, username, password string) (backend.Gateway, error)

NewBackend creates a new Backend.

Types

type Backend

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

Backend implements a MQTT pub-sub backend.

func (*Backend) Close

func (b *Backend) Close() error

Close closes the backend. Note that this closes the backend one-way (gateway to backend). This makes it possible to perform a graceful shutdown (e.g. when there are still packets to send back to the gateway).

func (*Backend) RXPacketChan

func (b *Backend) RXPacketChan() chan models.RXPacket

RXPacketChan returns the RXPacket channel.

func (*Backend) SendTXPacket

func (b *Backend) SendTXPacket(txPacket models.TXPacket) error

SendTXPacket sends the given TXPacket to the gateway.

Jump to

Keyboard shortcuts

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