pubDev

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(conf conf.DevLinkConf) error

Types

type MqttClient

type MqttClient struct {
	// contains filtered or unexported fields
}

func (*MqttClient) CheckIsOnline

func (d *MqttClient) CheckIsOnline(ctx context.Context, clientID string) (bool, error)

func (*MqttClient) Publish

func (d *MqttClient) Publish(ctx context.Context, topic string, payload []byte) error

type PubDev

type PubDev interface {
	Publish(ctx context.Context, topic string, payload []byte) error
	CheckIsOnline(ctx context.Context, clientID string) (bool, error)
}

PubDev 发送消息到设备

func NewPubDev

func NewPubDev(conf conf.DevLinkConf) (PubDev, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL