Documentation ¶
Index ¶
- func CreateTLSConfig(ClientCertificatePath string, PrivateKeyPath string, ...) (tlsConfig *tls.Config, err error)
- type Client
- func (this *Client) Publish(topic string, msg interface{}, qos byte) (err error)
- func (this *Client) PublishMqtt4(topic string, payload []byte, qos byte) (err error)
- func (this *Client) PublishMqtt5(topic string, payload []byte, qos byte) (err error)
- func (this *Client) PublishRaw(topic string, payload []byte, qos byte) (err error)
- func (this *Client) Stop()
- func (this *Client) Subscribe(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) SubscribeMqtt4(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) SubscribeMqtt5(topic string, qos byte, callback func(topic string, pl []byte)) error
- func (this *Client) Unsubscribe(topic ...string) error
- func (this *Client) UnsubscribeMqtt4(topic ...string) (err error)
- func (this *Client) UnsubscribeMqtt5(topic ...string) (err error)
- type MqttVersion
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { HubId string // contains filtered or unexported fields }
func (*Client) PublishMqtt4 ¶
func (*Client) PublishMqtt5 ¶
func (*Client) PublishRaw ¶
func (*Client) SubscribeMqtt4 ¶
func (*Client) SubscribeMqtt5 ¶
func (*Client) Unsubscribe ¶
func (*Client) UnsubscribeMqtt4 ¶
func (*Client) UnsubscribeMqtt5 ¶
type Subscription ¶
type Subscription struct { Topic string Handler paho.MessageHandler Qos byte }
Click to show internal directories.
Click to hide internal directories.