Documentation ¶
Index ¶
- Constants
- Variables
- func BrokerURI(config Config) string
- func RandomString(n int) string
- func StateTopic(device ha.Device, suffix string) string
- func UniqueId(device ha.Device, suffix string) string
- type Config
- type MQTT
- func (m *MQTT) ListVehicles(ctx context.Context, tmCfg tm.Config) (map[string]ha.Device, error)
- func (m *MQTT) Publish(ctx context.Context, discoveryPrefix string, v ...interface{}) error
- func (m *MQTT) PublishDiscovery(ctx context.Context, id string, device ha.Device, haCfg ha.Config, ...) error
- func (m *MQTT) Subscribe(ctx context.Context, topic string) (<-chan paho.Message, error)
- func (m *MQTT) Unsubscribe(ctx context.Context, topic string) error
- type PubSub
Constants ¶
View Source
const ( DefaultScheme = "ssl" DefaultHost = "127.0.0.1" DefaultPort = 8883 )
Variables ¶
View Source
var DefaultConfig = Config{ Scheme: DefaultScheme, Host: DefaultHost, Port: DefaultPort, }
Functions ¶
func RandomString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.