Documentation
¶
Index ¶
- func GetSharedTopic(topic string) string
- 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 ¶
func GetSharedTopic ¶ added in v0.12.0
Types ¶
type MqttService ¶
type MqttService struct {
Endpoint string
User string
Password string
ClientID string
MaxPubWindow int
Cleansession bool
AutoReconnect bool
Qos byte
TlsConfig *TlsConfig
Logger *zap.Logger
Client mqtt.Client
// contains filtered or unexported fields
}
func InitMqttService ¶ added in v0.12.0
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.