Documentation ¶
Index ¶
- type Client
- func (c *Client) DeleteRetained(topic string)
- func (c *Client) Publish(topic string, msg interface{})
- func (c *Client) PublishAsJSON(topic string, msg interface{})
- func (c *Client) PublishAsJSONRetained(topic string, msg interface{}) error
- func (c *Client) PublishRetained(topic string, msg interface{}) error
- func (c *Client) SetConnectHandler(fn func())
- func (c *Client) Subscribe(topic string, handler func(topic string, payload []byte)) error
- func (c *Client) Unsubscribe(topics ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { OnConnectHandler func() // contains filtered or unexported fields }
Broker wrapper over MQTT
func (*Client) DeleteRetained ¶
func (*Client) PublishAsJSON ¶
func (*Client) PublishAsJSONRetained ¶
func (*Client) PublishRetained ¶
func (*Client) SetConnectHandler ¶
func (c *Client) SetConnectHandler(fn func())
func (*Client) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.