Documentation ¶
Index ¶
- type Backend
- func (b *Backend) Close()
- func (b *Backend) DownlinkFrameChan() chan gw.DownlinkFrame
- func (b *Backend) GatewayConfigurationChan() chan gw.GatewayConfiguration
- func (b *Backend) PublishDownlinkTXAck(gatewayID lorawan.EUI64, msg gw.DownlinkTXAck) error
- func (b *Backend) PublishGatewayStats(gatewayID lorawan.EUI64, msg gw.GatewayStats) error
- func (b *Backend) PublishUplinkFrame(gatewayID lorawan.EUI64, msg gw.UplinkFrame) error
- func (b *Backend) SubscribeGateway(gatewayID lorawan.EUI64) error
- func (b *Backend) UnsubscribeGateway(gatewayID lorawan.EUI64) error
- type BackendAuthConfig
- type BackendConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
Backend implements a MQTT backend.
func NewBackend ¶
func NewBackend(config BackendConfig) (*Backend, error)
NewBackend creates a new Backend.
func (*Backend) DownlinkFrameChan ¶
func (b *Backend) DownlinkFrameChan() chan gw.DownlinkFrame
DownlinkFrameChan returns the downlink frame channel.
func (*Backend) GatewayConfigurationChan ¶
func (b *Backend) GatewayConfigurationChan() chan gw.GatewayConfiguration
GatewayConfigurationChan returns the gateway configuration channel.
func (*Backend) PublishDownlinkTXAck ¶
PublishDownlinkTXAck publishes a downlink ack to the MQTT broker.
func (*Backend) PublishGatewayStats ¶
PublishGatewayStats publishes a gateway stats message to the MQTT broker.
func (*Backend) PublishUplinkFrame ¶
PublishUplinkFrame publishes an uplink-frame to the MQTT broker.
func (*Backend) SubscribeGateway ¶
SubscribeGateway subscribes a gateway to its topics.
type BackendAuthConfig ¶
type BackendAuthConfig struct { Type string Generic auth.GenericConfig }
BackendAuthConfig holds the MQTT pub-sub backend auth configuration.
type BackendConfig ¶
type BackendConfig struct { UplinkTopicTemplate string `mapstructure:"uplink_topic_template"` DownlinkTopicTemplate string `mapstructure:"downlink_topic_template"` StatsTopicTemplate string `mapstructure:"stats_topic_template"` AckTopicTemplate string `mapstructure:"ack_topic_template"` ConfigTopicTemplate string `mapstructure:"config_topic_template"` Marshaler string `mapstructure:"marshaler"` Auth BackendAuthConfig // for backwards compatibility Server string Username string Password string CACert string `mapstructure:"ca_cert"` TLSCert string `mapstructure:"tls_cert"` TLSKey string `mapstructure:"tls_key"` QOS uint8 `mapstructure:"qos"` CleanSession bool `mapstructure:"clean_session"` ClientID string `mapstructure:"client_id"` MaxReconnectInterval time.Duration `mapstructure:"max_reconnect_interval"` AlwaysSubscribeMACs []lorawan.EUI64 `mapstructure:"-"` }
BackendConfig holds the MQTT pub-sub backend configuration.
Click to show internal directories.
Click to hide internal directories.