Documentation ¶
Index ¶
- type Backend
- func (b *Backend) PublishEvent(gatewayID lorawan.EUI64, event string, id uuid.UUID, v proto.Message) error
- func (b *Backend) SetDownlinkFrameFunc(f func(gw.DownlinkFrame))
- func (b *Backend) SetGatewayCommandExecRequestFunc(f func(gw.GatewayCommandExecRequest))
- func (b *Backend) SetGatewayConfigurationFunc(f func(gw.GatewayConfiguration))
- func (b *Backend) SetGatewaySubscription(subscribe bool, gatewayID lorawan.EUI64) error
- func (b *Backend) SetRawPacketForwarderCommandFunc(f func(gw.RawPacketForwarderCommand))
- func (b *Backend) Start() error
- func (b *Backend) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements a MQTT backend.
func NewBackend ¶
NewBackend creates a new Backend.
func (*Backend) PublishEvent ¶
func (b *Backend) PublishEvent(gatewayID lorawan.EUI64, event string, id uuid.UUID, v proto.Message) error
PublishEvent publishes the given event.
func (*Backend) SetDownlinkFrameFunc ¶
func (b *Backend) SetDownlinkFrameFunc(f func(gw.DownlinkFrame))
SetDownlinkFrameFunc sets the DownlinkFrame handler func.
func (*Backend) SetGatewayCommandExecRequestFunc ¶
func (b *Backend) SetGatewayCommandExecRequestFunc(f func(gw.GatewayCommandExecRequest))
SetGatewayCommandExecRequestFunc sets the GatewayCommandExecRequest handler func.
func (*Backend) SetGatewayConfigurationFunc ¶
func (b *Backend) SetGatewayConfigurationFunc(f func(gw.GatewayConfiguration))
SetGatewayConfigurationFunc sets the GatewayConfiguration handler func.
func (*Backend) SetGatewaySubscription ¶
SetGatewaySubscription sets or unsets the gateway. Note: the actual MQTT (un)subscribe happens in a separate function to avoid race conditions in case of connection issues. This way, the gateways map always reflect the desired state.
func (*Backend) SetRawPacketForwarderCommandFunc ¶
func (b *Backend) SetRawPacketForwarderCommandFunc(f func(gw.RawPacketForwarderCommand))
SetRawPacketForwarderCommandFunc sets the RawPacketForwarderCommand handler func.