pubInner

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnType

type ConnType int8
const (
	Connect ConnType = iota
	DisConnect
)

type NatsClient

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

func (*NatsClient) DevPubConfig

func (n *NatsClient) DevPubConfig(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) DevPubGateway added in v0.3.0

func (n *NatsClient) DevPubGateway(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) DevPubOta

func (n *NatsClient) DevPubOta(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) DevPubSDKLog

func (n *NatsClient) DevPubSDKLog(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) DevPubShadow

func (n *NatsClient) DevPubShadow(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) DevPubThing

func (n *NatsClient) DevPubThing(ctx context.Context, publishMsg *devices.DevPublish) error

func (*NatsClient) PubConn

func (n *NatsClient) PubConn(ctx context.Context, conn ConnType, info *devices.DevConn) error

type PubInner

type PubInner interface {
	// DevPubThing 向内部发布设备发布的物模型消息
	DevPubThing(ctx context.Context, publishMsg *devices.DevPublish) error
	// DevPubOta 发布ota升级相关消息
	DevPubOta(ctx context.Context, publishMsg *devices.DevPublish) error
	// DevPubShadow 发布设备影子消息
	DevPubShadow(ctx context.Context, publishMsg *devices.DevPublish) error
	// DevPubSDKLog 发布设备调试日志
	DevPubSDKLog(ctx context.Context, publishMsg *devices.DevPublish) error
	// DevPubGateway 发布网关子设备消息
	DevPubGateway(ctx context.Context, publishMsg *devices.DevPublish) error
	// DevPubConfig 发布设备配置相关消息
	DevPubConfig(ctx context.Context, publishMsg *devices.DevPublish) error
	// PubConn 向内部发布连接及断连消息
	PubConn(ctx context.Context, conn ConnType, info *devices.DevConn) error
}

func NewPubInner

func NewPubInner(c conf.EventConf) (PubInner, error)

Jump to

Keyboard shortcuts

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