Documentation ¶
Index ¶
- func NewBackend(conf Config) (backend.Gateway, error)
- type Backend
- func (b *Backend) Close() error
- func (b *Backend) DownlinkTXAckChan() chan gw.DownlinkTXAck
- func (b *Backend) RXPacketChan() chan gw.UplinkFrame
- func (b *Backend) SendGatewayConfigPacket(pl gw.GatewayConfiguration) error
- func (b *Backend) SendTXPacket(pl gw.DownlinkFrame) error
- func (b *Backend) StatsPacketChan() chan gw.GatewayStats
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
Backend implements a Google Cloud Pub/Sub backend.
func (*Backend) DownlinkTXAckChan ¶
func (b *Backend) DownlinkTXAckChan() chan gw.DownlinkTXAck
DownlinkTXAckChan returns the downlink tx ack channel.
func (*Backend) RXPacketChan ¶
func (b *Backend) RXPacketChan() chan gw.UplinkFrame
RXPacketChan returns the channel to which uplink frames are published.
func (*Backend) SendGatewayConfigPacket ¶
func (b *Backend) SendGatewayConfigPacket(pl gw.GatewayConfiguration) error
SendGatewayConfigPacket sends the given gateway configuration to the gateway.
func (*Backend) SendTXPacket ¶
func (b *Backend) SendTXPacket(pl gw.DownlinkFrame) error
SendTXPacket sends the given downlink frame to the gateway.
func (*Backend) StatsPacketChan ¶
func (b *Backend) StatsPacketChan() chan gw.GatewayStats
StatsPacketChan returns the channel to which gateway stats are published.
type Config ¶
type Config struct { CredentialsFile string `mapstructure:"credentials_file"` ProjectID string `mapstructure:"project_id"` UplinkTopicName string `mapstructure:"uplink_topic_name"` DownlinkTopicName string `mapstructure:"downlink_topic_name"` UplinkRetentionDuration time.Duration `mapstructure:"uplink_retention_duration"` }
Config holds the configuration for the GCP Pub/Sub backend.
Click to show internal directories.
Click to hide internal directories.