Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Gid = uuid.New().String()
Functions ¶
func GetMsgChannel ¶
func RegisterTerm ¶
func RegisterTerm(ctx context.Context, c client.XClient, ch chan *protocol.Message, sid string, platform uint8) (needKeep bool, err error)
如果needKeep为true,请不要在外部关闭XClient
func RunMsgPollServer ¶
Types ¶
type ConcurrentQueue ¶
type ConcurrentQueue[T any] struct { // contains filtered or unexported fields }
ConcurrentQueue 是一个并发安全的队列数据结构
func NewConcurrentQueue ¶
func NewConcurrentQueue[T any]() *ConcurrentQueue[T]
NewConcurrentQueue 创建一个新的并发安全队列
func (*ConcurrentQueue[T]) Dequeue ¶
func (q *ConcurrentQueue[T]) Dequeue() QueueResult[T]
Dequeue 从队列头部移除并返回元素
func (*ConcurrentQueue[T]) Enqueue ¶
func (q *ConcurrentQueue[T]) Enqueue(value T)
Enqueue 将元素添加到队列尾部
type QueueResult ¶
Click to show internal directories.
Click to hide internal directories.