Documentation
¶
Index ¶
- Constants
- func NewBackend(p *redis.Pool, server, username, password string) (backend.Application, error)
- type Backend
- func (b *Backend) Close() error
- func (b *Backend) SendNotification(appEUI, devEUI lorawan.EUI64, typ models.NotificationType, payload interface{}) error
- func (b *Backend) SendRXPayload(appEUI, devEUI lorawan.EUI64, payload models.RXPayload) error
- func (b *Backend) TXPayloadChan() chan models.TXPayload
Constants ¶
View Source
const DownlinkLockTTL = time.Millisecond * 100
DownlinkLockTTL defines the downlink lock ttl.
Variables ¶
This section is empty.
Functions ¶
func NewBackend ¶
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 ¶
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 ¶
SendRXPayload sends the given RXPayload to the application.
func (*Backend) TXPayloadChan ¶
TXPayloadChan returns the TXPayload channel.
Click to show internal directories.
Click to hide internal directories.