Documentation
¶
Index ¶
- Variables
- func DelClient(clientId string)
- func HasClient(clientId string) bool
- func Keys() map[string]interface{}
- type MqttClient
- func (e *MqttClient) Connect() error
- func (e *MqttClient) Disconnect() error
- func (e *MqttClient) GetClient() mqtt.Client
- func (e *MqttClient) HasTopic(topic string) bool
- func (e *MqttClient) IsConnected() bool
- func (e *MqttClient) Publish(topic string, payload interface{}, timeout int64) error
- func (e *MqttClient) SetOption(config map[string]interface{}) error
- func (e *MqttClient) Subscribe(topic string, handler mqtt.MessageHandler) error
- func (e *MqttClient) Topics() []string
- func (e *MqttClient) Unsubscribe(topic string) (mqtt.Token, error)
- func (e *MqttClient) Unsubscribes(topics ...string) (mqtt.Token, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AutoTask *autoTask
)
Functions ¶
Types ¶
type MqttClient ¶
type MqttClient struct {
// contains filtered or unexported fields
}
func GetClient ¶
func GetClient(clientId string) *MqttClient
func NewClient ¶
func NewClient(clientId string) *MqttClient
func (*MqttClient) Connect ¶
func (e *MqttClient) Connect() error
func (*MqttClient) Disconnect ¶
func (e *MqttClient) Disconnect() error
func (*MqttClient) GetClient ¶
func (e *MqttClient) GetClient() mqtt.Client
func (*MqttClient) HasTopic ¶
func (e *MqttClient) HasTopic(topic string) bool
func (*MqttClient) IsConnected ¶
func (e *MqttClient) IsConnected() bool
func (*MqttClient) Publish ¶
func (e *MqttClient) Publish(topic string, payload interface{}, timeout int64) error
func (*MqttClient) SetOption ¶
func (e *MqttClient) SetOption(config map[string]interface{}) error
func (*MqttClient) Subscribe ¶
func (e *MqttClient) Subscribe(topic string, handler mqtt.MessageHandler) error
func (*MqttClient) Topics ¶
func (e *MqttClient) Topics() []string
func (*MqttClient) Unsubscribe ¶
func (e *MqttClient) Unsubscribe(topic string) (mqtt.Token, error)
func (*MqttClient) Unsubscribes ¶
func (e *MqttClient) Unsubscribes(topics ...string) (mqtt.Token, error)
Click to show internal directories.
Click to hide internal directories.