Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication interface { // Init applies the initial configuration. Init(*mqtt.ClientOptions) error // GetGatewayID returns the GatewayID if available. GetGatewayID() *lorawan.EUI64 // Update updates the authentication options. Update(*mqtt.ClientOptions) error // ReconnectAfter returns a time.Duration after which the MQTT client must re-connect. // Note: return 0 to disable the periodical re-connect feature. ReconnectAfter() time.Duration }
Authentication defines the authentication interface.
func NewAzureIoTHubAuthentication ¶
func NewAzureIoTHubAuthentication(c config.Config) (Authentication, error)
NewAzureIoTHubAuthentication creates an AzureIoTHubAuthentication.
func NewGCPCloudIoTCoreAuthentication ¶
func NewGCPCloudIoTCoreAuthentication(conf config.Config) (Authentication, error)
NewGCPCloudIoTCoreAuthentication create a GCPCloudIoTCoreAuthentication.
func NewGenericAuthentication ¶
func NewGenericAuthentication(conf config.Config) (Authentication, error)
NewGenericAuthentication creates a GenericAuthentication.
type AzureIoTHubAuthentication ¶
type AzureIoTHubAuthentication struct {
// contains filtered or unexported fields
}
AzureIoTHubAuthentication implements the Azure IoT Hub authentication.
func (*AzureIoTHubAuthentication) GetGatewayID ¶
func (a *AzureIoTHubAuthentication) GetGatewayID() *lorawan.EUI64
GetGatewayID returns the GatewayID if available. TODO: implement.
func (*AzureIoTHubAuthentication) Init ¶
func (a *AzureIoTHubAuthentication) Init(opts *mqtt.ClientOptions) error
Init applies the initial configuration.
func (*AzureIoTHubAuthentication) ReconnectAfter ¶
func (a *AzureIoTHubAuthentication) ReconnectAfter() time.Duration
ReconnectAfter returns a time.Duration after which the MQTT client must re-connect. Note: return 0 to disable the periodical re-connect feature.
func (*AzureIoTHubAuthentication) Update ¶
func (a *AzureIoTHubAuthentication) Update(opts *mqtt.ClientOptions) error
Update updates the authentication options.
type GCPCloudIoTCoreAuthentication ¶
type GCPCloudIoTCoreAuthentication struct {
// contains filtered or unexported fields
}
GCPCloudIoTCoreAuthentication implements the Google Cloud IoT Core authentication.
func (*GCPCloudIoTCoreAuthentication) GetGatewayID ¶
func (a *GCPCloudIoTCoreAuthentication) GetGatewayID() *lorawan.EUI64
GetGatewayID returns the GatewayID if available. TODO: implement.
func (*GCPCloudIoTCoreAuthentication) Init ¶
func (a *GCPCloudIoTCoreAuthentication) Init(opts *mqtt.ClientOptions) error
Init applies the initial configuration.
func (*GCPCloudIoTCoreAuthentication) ReconnectAfter ¶
func (a *GCPCloudIoTCoreAuthentication) ReconnectAfter() time.Duration
ReconnectAfter returns a time.Duration after which the MQTT.Auth.client must re-connect. Note: return 0 to disable the periodical re-connect feature.
func (*GCPCloudIoTCoreAuthentication) Update ¶
func (a *GCPCloudIoTCoreAuthentication) Update(opts *mqtt.ClientOptions) error
Update updates the authentication options.
type GenericAuthentication ¶
type GenericAuthentication struct {
// contains filtered or unexported fields
}
GenericAuthentication implements a generic MQTT authentication.
func (*GenericAuthentication) GetGatewayID ¶
func (a *GenericAuthentication) GetGatewayID() *lorawan.EUI64
GetGatewayID returns the GatewayID if available.
func (*GenericAuthentication) Init ¶
func (a *GenericAuthentication) Init(opts *mqtt.ClientOptions) error
Init applies the initial configuration.
func (*GenericAuthentication) ReconnectAfter ¶
func (a *GenericAuthentication) ReconnectAfter() time.Duration
ReconnectAfter returns a time.Duration after which the MQTT client must re-connect. Note: return 0 to disable the periodical re-connect feature.
func (*GenericAuthentication) Update ¶
func (a *GenericAuthentication) Update(opts *mqtt.ClientOptions) error
Update updates the authentication options.