Documentation
¶
Index ¶
- func NewClient(mqtt *Mqtt, name string) mqttType.MqttCli
- func NewMqtt(lc fx.Lifecycle, cfg *Config, authenticator mqttType.MqttAuthenticator, ...) (mqtt mqttType.MqttServ)
- type Admin
- type Config
- type Mqtt
- func (m *Mqtt) Admin() Admin
- func (m *Mqtt) Authenticator() mqttType.MqttAuthenticator
- func (m *Mqtt) NewClient(name string) (client mqttType.MqttCli)
- func (m *Mqtt) Publish(topic string, payload []byte, qos uint8, retain bool) (err error)
- func (m *Mqtt) RemoveClient(name string)
- func (m *Mqtt) Shutdown() (err error)
- func (m *Mqtt) Start()
- type MqttBind
- type MqttServAdmin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Admin ¶
type Admin interface { GetClients(limit, offset uint) (list []*admin.ClientInfo, total uint32, err error) GetClient(clientId string) (client *admin.ClientInfo, err error) GetSessions(limit, offset uint) (list []*admin.SessionInfo, total int, err error) GetSession(clientId string) (session *admin.SessionInfo, err error) GetSubscriptions(clientId string, limit, offset uint) (list []*admin.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 []*admin.SubscriptionInfo, err error) }
Admin ...
type Config ¶
type Config struct { Port int RetryInterval time.Duration RetryCheckInterval time.Duration SessionExpiryInterval time.Duration SessionExpireCheckInterval time.Duration QueueQos0Messages bool MaxInflight int MaxAwaitRel int MaxMsgQueue int Logging bool DebugMode common.RunMode }
Config ...
type Mqtt ¶
type Mqtt struct {
// contains filtered or unexported fields
}
Mqtt ...
func (*Mqtt) Authenticator ¶
func (m *Mqtt) Authenticator() mqttType.MqttAuthenticator
Authenticator ...
type MqttServAdmin ¶
type MqttServAdmin interface {
Admin() Admin
}
Click to show internal directories.
Click to hide internal directories.