domain

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEOF

func IsEOF(msg Message) bool

Types

type Business

type Business struct {
	Name   string `json:"name"`
	Domain string `json:"domain"`
}

Business 业务名字,域名

type Command

type Command struct {
	Type    string
	Content string
}

type Device

type Device struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

Device 设备类型,id

type Message

type Message struct {
	Business Business `json:"business"`
	Device   Device   `json:"device"`
}

Message 消息定义

func GetEOF

func GetEOF(biz string) Message

GetEOF EOF消息,用于标识为消息末尾, 在并发阻塞队列中无法通过队列是否为空来判断后面是否还有消息

type PushCommand

type PushCommand struct {
	DeviceID string
	Cmd      Command
}

PushCommand 生成的推送指令

type Task

type Task struct {
	MessageList []Message
	Qps         int
}

Task 生产者生产的消息列表

Jump to

Keyboard shortcuts

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