Documentation ¶
Index ¶
Constants ¶
View Source
const ( EMPTY = "EMPTY" //无数据 HEARTBEAT = "HEARTBEAT" //心跳 )
View Source
const (
Version = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Msg ¶
func ResponseMsg ¶
func SuccessMsg ¶
func (*Msg) InitLength ¶
func (msg *Msg) InitLength()
func (*Msg) IsHeartbeat ¶ added in v1.0.0
type MsgType ¶
type MsgType int32
const ( POST_WAIT_RESPONSE MsgType = iota // 请求,并等待服务器响应(客户端推送消息后需要等待并接收服务端的处理结果) POST_NO_RESPONSE // 请求,不需要服务器响应(客户端推送消息后不需要等待服务端的处理结果,防止网络I/O阻塞) RESPONSE // 服务器响应 QUERY // 查询消息队列 QUERY_POP // 查询消息队列,并删除消息 QUERY_STREAM // 查询消息队列,返回消息流,每个消息只会被一个消费者消费 QUERY_STREAM_GROUP // 查询消息队列,返回消息流,每个消息可以被多个消费者消费 )
func (MsgType) IsQueryStream ¶ added in v1.1.0
IsQueryStream 是否是query stream类型的消息
func (MsgType) NeedReplyToClient ¶ added in v1.1.0
NeedReplyToClient 是否需要向客户端响应
Click to show internal directories.
Click to hide internal directories.