Documentation ¶
Index ¶
- type MessageCallback
- type MqttMessage
- type MqttSimpleClient
- func (b *MqttSimpleClient) Connect() error
- func (b *MqttSimpleClient) Disconnect(timeout uint)
- func (b *MqttSimpleClient) Publish(topic, value string, qos byte, retained bool) error
- func (b *MqttSimpleClient) SetCleanSession(state bool)
- func (b *MqttSimpleClient) Subscribe(topic string, qos byte) (<-chan *MqttMessage, error)
- func (b *MqttSimpleClient) SubscribeMultiple(topics []string, qos byte) (<-chan *MqttMessage, error)
- func (b *MqttSimpleClient) SubscribeToEverything(qos byte) (<-chan *MqttMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageCallback ¶
type MessageCallback func(topic, value string)
type MqttMessage ¶
type MqttSimpleClient ¶
type MqttSimpleClient struct {
// contains filtered or unexported fields
}
func NewMqttSimpleClient ¶
func NewMqttSimpleClient(broker, clientid, user, password string) *MqttSimpleClient
func (*MqttSimpleClient) Connect ¶
func (b *MqttSimpleClient) Connect() error
func (*MqttSimpleClient) Disconnect ¶
func (b *MqttSimpleClient) Disconnect(timeout uint)
func (*MqttSimpleClient) Publish ¶
func (b *MqttSimpleClient) Publish(topic, value string, qos byte, retained bool) error
func (*MqttSimpleClient) SetCleanSession ¶
func (b *MqttSimpleClient) SetCleanSession(state bool)
func (*MqttSimpleClient) Subscribe ¶
func (b *MqttSimpleClient) Subscribe(topic string, qos byte) (<-chan *MqttMessage, error)
func (*MqttSimpleClient) SubscribeMultiple ¶
func (b *MqttSimpleClient) SubscribeMultiple(topics []string, qos byte) (<-chan *MqttMessage, error)
func (*MqttSimpleClient) SubscribeToEverything ¶
func (b *MqttSimpleClient) SubscribeToEverything(qos byte) (<-chan *MqttMessage, error)
Click to show internal directories.
Click to hide internal directories.