Documentation ¶
Index ¶
- func NatsSubWithType[msgType any](handle func(ctx context.Context, msgIn msgType, natsMsg *nats.Msg) error) func(msg *nats.Msg)
- func NatsSubscription(handle HandleFunc) func(msg *nats.Msg)
- func NewEventMsg(ctx context.Context, data []byte) []byte
- type ChangeInfo
- type DeviceCore
- type DeviceUpdateInfo
- type EventHandle
- type GatewayUpdateInfo
- type HandleFunc
- type MsgHead
- type MySpanContextConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NatsSubWithType ¶ added in v0.5.1
func NatsSubscription ¶
func NatsSubscription(handle HandleFunc) func(msg *nats.Msg)
Types ¶
type ChangeInfo ¶ added in v0.5.1
type ChangeInfo struct {
ID int64
}
type DeviceCore ¶ added in v0.3.0
type DeviceUpdateInfo ¶ added in v0.5.1
type EventHandle ¶
func GetEventMsg ¶
func GetEventMsg(data []byte) EventHandle
type GatewayUpdateInfo ¶ added in v0.3.0
type GatewayUpdateInfo struct { GatewayProductID string GatewayDeviceName string Status int32 //拓扑关系变化状态。* 2:解绑* 1:绑定 Devices []*DeviceCore //子设备列表 }
type MsgHead ¶
type MsgHead struct { Trace []byte `json:"trace"` //追踪tid Timestamp int64 `json:"timestamp"` //发送时毫秒级时间戳 Data []byte `json:"data"` //传送的内容 }
MsgHead 消息队列的头 todo 后续考虑用proto重构这个头
type MySpanContextConfig ¶
Click to show internal directories.
Click to hide internal directories.