Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadLoginOrPassword = fmt.Errorf("bad login or password")
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(adaptors *adaptors.Adaptors) *Authenticator
func (*Authenticator) Authenticate ¶
func (a *Authenticator) Authenticate(login string, pass interface{}) (err error)
func (Authenticator) LocalClientUuid ¶
func (a Authenticator) LocalClientUuid() string
func (Authenticator) Name ¶
func (a Authenticator) Name() string
func (*Authenticator) Register ¶
func (a *Authenticator) Register()
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(uri, topic string, authenticator *Authenticator) (client *Client, err error)
func (*Client) Subscribe ¶
func (c *Client) Subscribe(topic string, onComplete service.OnCompleteFunc, onPublish service.OnPublishFunc) (err error)
type Mqtt ¶
type Mqtt struct {
// contains filtered or unexported fields
}
func NewMqtt ¶
func NewMqtt(cfg *MqttConfig, graceful *graceful_service.GracefulService, authenticator *Authenticator) (mqtt *Mqtt)
type MqttConfig ¶
type MqttConfig struct { SrvKeepAlive int SrvConnectTimeout int SrvSessionsProvider string SrvTopicsProvider string SrvPort int }
func NewMqttConfig ¶
func NewMqttConfig(cfg *config.AppConfig) *MqttConfig
Click to show internal directories.
Click to hide internal directories.