Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the connection to the MQTT broker.
func (*Client) Publish ¶
Publish will send the list of messages it is passed to the broker that the client is connected to. Any errors in publihsing will be returned.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(subs ...*Subscription) error
Subscribe will parse the list of subscriptions and listen on their topics, passing any received messages to their callback functions. Any error in setting up a subscription will be returned.
type Device ¶
type Device interface { Name() string Configuration() []*Msg States() []*Msg Subscriptions() []*Subscription }
type Msg ¶
type Msg struct { Topic string Message json.RawMessage QOS byte Retained bool }
Msg represents a message that can be sent or received on the MQTT bus.
Click to show internal directories.
Click to hide internal directories.