Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapHandler ¶
func WrapHandler[T any](handler func(T)) MQTT.MessageHandler
Types ¶
type MQTTClient ¶
type MQTTClient struct {
// contains filtered or unexported fields
}
func StartMQTTClient ¶
func StartMQTTClient(url, port, clientID string) MQTTClient
func (*MQTTClient) Close ¶
func (c *MQTTClient) Close()
func (*MQTTClient) SendMessage ¶
func (c *MQTTClient) SendMessage(topic string, message string)
func (*MQTTClient) SubscribeToThermostat ¶
func (c *MQTTClient) SubscribeToThermostat(topic string, handler func(models.SensorState))
func (*MQTTClient) SubscribeToValves ¶
func (c *MQTTClient) SubscribeToValves(topic string, handler func(map[string]any))
type MessageClient ¶
Click to show internal directories.
Click to hide internal directories.