application

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DownlinkLockTTL = time.Millisecond * 100

DownlinkLockTTL defines the downlink lock ttl.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(p *redis.Pool, server, username, password string) (backend.Application, error)

NewBackend creates a new Backend.

Types

type Backend

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

Backend implements a MQTT pub-sub application backend.

func (*Backend) Close

func (b *Backend) Close() error

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

func (*Backend) SendNotification

func (b *Backend) SendNotification(appEUI, devEUI lorawan.EUI64, typ models.NotificationType, payload interface{}) error

SendNotification sends the given notification to the application.

func (*Backend) SendRXPayload

func (b *Backend) SendRXPayload(appEUI, devEUI lorawan.EUI64, payload models.RXPayload) error

SendRXPayload sends the given RXPayload to the application.

func (*Backend) TXPayloadChan

func (b *Backend) TXPayloadChan() chan models.TXPayload

TXPayloadChan returns the TXPayload channel.

Jump to

Keyboard shortcuts

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