Documentation
¶
Index ¶
- type MqttService
- func (m *MqttService) LogMessage(c mqtt.Client, msg mqtt.Message)
- func (m *MqttService) OnConnect(c mqtt.Client)
- func (m *MqttService) Pub(topic string, qos byte, retained bool, payload any) error
- func (m *MqttService) StartHeartbeat(serviceNmae, hbSchedule string)
- func (m *MqttService) Sub(topic string, handle mqtt.MessageHandler) error
- type TlsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MqttService ¶
type MqttService struct { Endpoint string User string Password string ClientID string Cleansession bool AutoReconnect bool Qos byte TlsConfig *TlsConfig Logger *zap.Logger Client mqtt.Client // contains filtered or unexported fields }
func NewMQTTClient ¶ added in v0.11.0
func NewMQTTClient(logger *zap.Logger, broke *MqttService, subKey string) (*MqttService, error)
func (*MqttService) LogMessage ¶
func (m *MqttService) LogMessage(c mqtt.Client, msg mqtt.Message)
func (*MqttService) OnConnect ¶
func (m *MqttService) OnConnect(c mqtt.Client)
func (*MqttService) StartHeartbeat ¶ added in v0.10.18
func (m *MqttService) StartHeartbeat(serviceNmae, hbSchedule string)
func (*MqttService) Sub ¶
func (m *MqttService) Sub(topic string, handle mqtt.MessageHandler) error
Click to show internal directories.
Click to hide internal directories.