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
// Return the basestation EUI64 if available
GetBasestationEui() *common.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 NewGenericAuthentication ¶
func NewGenericAuthentication(conf config.Config) (Authentication, error)
NewGenericAuthentication creates a GenericAuthentication.
type GenericAuthentication ¶
type GenericAuthentication struct {
// contains filtered or unexported fields
}
GenericAuthentication implements a generic MQTT authentication.
func (*GenericAuthentication) GetBasestationEui ¶
func (a *GenericAuthentication) GetBasestationEui() *common.EUI64
Return the basestation EUI64 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.
Click to show internal directories.
Click to hide internal directories.