Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelTrace = slog.Level(-8) LevelFatal = slog.Level(12) )
Variables ¶
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 NewClient ¶
func NewClient(ctx context.Context, prefs Preferences, subscriptions []*Subscription, configs []*Msg) (*Client, error)
type Device ¶
type Device interface { Name() string Configuration() []*Msg States() []*Msg Subscriptions() []*Subscription }
type Msg ¶
Msg represents a message that can be sent or received on the MQTT bus.
type Preferences ¶
type Subscription ¶
Subscription represents a listener on a specific Topic, that will pass any messages sent to that topic to the Callback function.
Click to show internal directories.
Click to hide internal directories.