Documentation ¶
Index ¶
- Constants
- type ArkMqttMsg
- type MqttConfig
- type MqttTunnel
- func (m *MqttTunnel) FetchHealthData(_ context.Context, baseID string) error
- func (m *MqttTunnel) InstallBiz(_ context.Context, deviceID string, bizModel *ark.BizModel) error
- func (m *MqttTunnel) Name() string
- func (m *MqttTunnel) OnBaseStart(ctx context.Context, baseID string)
- func (m *MqttTunnel) OnBaseStop(ctx context.Context, baseID string)
- func (m *MqttTunnel) QueryAllBizData(_ context.Context, baseID string) error
- func (m *MqttTunnel) Register(ctx context.Context, clientID string, ...) (err error)
- func (m *MqttTunnel) UninstallBiz(_ context.Context, deviceID string, bizModel *ark.BizModel) error
Constants ¶
View Source
const ( DefaultMQTTBroker = "test-broker" DefaultMQTTUsername = "test-username" DefaultMQTTPassword = "public" DefaultMQTTClientPrefix = "koupleless" DefaultMQTTPort = 1883 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArkMqttMsg ¶
type ArkMqttMsg[T any] struct { PublishTimestamp int64 `json:"publishTimestamp"` Data T `json:"data"` }
ArkMqttMsg is the response of mqtt message payload.
type MqttConfig ¶
type MqttTunnel ¶
type MqttTunnel struct {
// contains filtered or unexported fields
}
func (*MqttTunnel) FetchHealthData ¶
func (m *MqttTunnel) FetchHealthData(_ context.Context, baseID string) error
func (*MqttTunnel) InstallBiz ¶
func (*MqttTunnel) Name ¶
func (m *MqttTunnel) Name() string
func (*MqttTunnel) OnBaseStart ¶
func (m *MqttTunnel) OnBaseStart(ctx context.Context, baseID string)
func (*MqttTunnel) OnBaseStop ¶
func (m *MqttTunnel) OnBaseStop(ctx context.Context, baseID string)
func (*MqttTunnel) QueryAllBizData ¶
func (m *MqttTunnel) QueryAllBizData(_ context.Context, baseID string) error
func (*MqttTunnel) Register ¶
func (m *MqttTunnel) Register(ctx context.Context, clientID string, baseDiscoveredCallback tunnel.BaseDiscoveredCallback, healthDataArrivedCallback tunnel.HealthDataArrivedCallback, queryAllBizDataArrivedCallback tunnel.QueryAllBizDataArrivedCallback) (err error)
func (*MqttTunnel) UninstallBiz ¶
Click to show internal directories.
Click to hide internal directories.