Documentation ¶
Index ¶
- type IManagement
- type Mqtt
- func (m *Mqtt) Management() IManagement
- func (m *Mqtt) NewClient(cfg *mqtt_client.Config) (c *mqtt_client.Client, err error)
- func (m *Mqtt) OnConnect(cs gmqtt.ChainStore, client gmqtt.Client) (code uint8)
- func (m *Mqtt) OnConnected(cs gmqtt.ChainStore, client gmqtt.Client)
- func (m *Mqtt) OnSessionCreated(cs gmqtt.ChainStore, client gmqtt.Client)
- func (m *Mqtt) OnSessionResumed(cs gmqtt.ChainStore, client gmqtt.Client)
- func (m *Mqtt) Publish(topic string, payload []byte, qos uint8, retain bool)
- func (m *Mqtt) Shutdown()
- type MqttBind
- type MqttConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IManagement ¶ added in v0.0.20
type IManagement interface { GetClients(limit, offset int) (list []*management.ClientInfo, total int, err error) GetClient(clientId string) (client *management.ClientInfo, err error) GetSessions(limit, offset int) (list []*management.SessionInfo, total int, err error) GetSession(clientId string) (session *management.SessionInfo, err error) GetSubscriptions(clientId string, limit, offset int) (list []*management.SubscriptionInfo, total int, err error) Subscribe(clientId, topic string, qos int) (err error) Unsubscribe(clientId, topic string) (err error) Publish(topic string, qos int, payload []byte, retain bool) (err error) CloseClient(clientId string) (err error) SearchTopic(query string) (result []*management.SubscriptionInfo, err error) }
type Mqtt ¶
type Mqtt struct {
// contains filtered or unexported fields
}
func NewMqtt ¶
func NewMqtt(cfg *MqttConfig, graceful *graceful_service.GracefulService, authenticator *mqtt_authenticator.Authenticator, scriptService *scripts.ScriptService) (mqtt *Mqtt)
func (*Mqtt) Management ¶ added in v0.0.20
func (m *Mqtt) Management() IManagement
func (*Mqtt) NewClient ¶
func (m *Mqtt) NewClient(cfg *mqtt_client.Config) (c *mqtt_client.Client, err error)
func (*Mqtt) OnConnected ¶ added in v0.0.19
func (m *Mqtt) OnConnected(cs gmqtt.ChainStore, client gmqtt.Client)
func (*Mqtt) OnSessionCreated ¶ added in v0.0.19
func (m *Mqtt) OnSessionCreated(cs gmqtt.ChainStore, client gmqtt.Client)
func (*Mqtt) OnSessionResumed ¶ added in v0.0.19
func (m *Mqtt) OnSessionResumed(cs gmqtt.ChainStore, client gmqtt.Client)
type MqttBind ¶ added in v0.0.19
type MqttBind struct {
// contains filtered or unexported fields
}
Javascript Binding
mqtt
.publish
func NewMqttBind ¶ added in v0.0.19
type MqttConfig ¶
type MqttConfig struct { Port int RetryInterval time.Duration RetryCheckInterval time.Duration SessionExpiryInterval time.Duration SessionExpireCheckInterval time.Duration QueueQos0Messages bool MaxInflight int MaxAwaitRel int MaxMsgQueue int DeliverMode gmqtt.DeliverMode }
func NewMqttConfig ¶
func NewMqttConfig(cfg *config.AppConfig) *MqttConfig
Click to show internal directories.
Click to hide internal directories.