Documentation ¶
Index ¶
- Constants
- func NewBackend(p *redis.Pool, server, username, password string) (backend.NetworkController, error)
- type Backend
- func (b *Backend) Close() error
- func (b *Backend) SendErrorPayload(appEUI, devEUI lorawan.EUI64, payload models.ErrorPayload) error
- func (b *Backend) SendMACPayload(appEUI, devEUI lorawan.EUI64, pl models.MACPayload) error
- func (b *Backend) SendRXInfoPayload(appEUI, devEUI lorawan.EUI64, payload models.RXInfoPayload) error
- func (b *Backend) TXMACPayloadChan() chan models.MACPayload
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.NetworkController, error)
NewBackend creates a new Backend.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements a MQTT pub-sub network-controller backend.
func (*Backend) Close ¶
Close closes the backend. Note that this closes the backend one-way (network-controller to the backend). This makes it possible to perform a graceful shutdown (e.g. when there are still packets to send back to the network-controller).
func (*Backend) SendErrorPayload ¶
SendErrorPayload sends the given ErrorPayload to the network-controller.
func (*Backend) SendMACPayload ¶
SendMACPayload sends the given MACPayload to the network-controller.
func (*Backend) SendRXInfoPayload ¶
func (b *Backend) SendRXInfoPayload(appEUI, devEUI lorawan.EUI64, payload models.RXInfoPayload) error
SendRXInfoPayload sends the given RXInfoPayload to the network-controller.
func (*Backend) TXMACPayloadChan ¶
func (b *Backend) TXMACPayloadChan() chan models.MACPayload
TXMACPayloadChan returns the channel of MACPayload items to send.
Click to show internal directories.
Click to hide internal directories.