Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Close the client and clean up all connections
Close() error
// GetPahoPubSub PubSub Subscribe to uplink and events, publish downlink
GetPahoPubSub() (*PahoPubSub, error)
}
Client interface for a paho server
type ClientConfig ¶
type GooglePubSub ¶
type MqttProxyConfig ¶
type MqttProxyConfig struct {
AppID string
AppKey string
MqttAddress string
Username string
CanDownlink bool
GooglePubSub GooglePubSub
Transformer lib.PahoTransformer
PayloadAdjuster lib.PayloadAdjuster
}
MqttProxyConfig - for ttn the Username has the form: username = fmt.Sprintf("%s@ttn", p.AppID)
type PahoProxy ¶
type PahoProxy struct {
// contains filtered or unexported fields
}
func NewPahoProxy ¶
func NewPahoProxy(p MqttProxyConfig) (*PahoProxy, error)
type PahoPubSub ¶
type PahoPubSub struct {
AppID string
DevID string
SubPubs map[string]string
Errors chan error
// contains filtered or unexported fields
}
func (*PahoPubSub) SendDownlink ¶
func (p *PahoPubSub) SendDownlink(topic string, payload []byte) error
Click to show internal directories.
Click to hide internal directories.