Documentation
¶
Index ¶
- type ChanQueue
- func (q *ChanQueue) AsyncPop() (val interface{}, err error)
- func (q *ChanQueue) AsyncPush(x interface{}) (err error)
- func (q *ChanQueue) AutoPop() ([]interface{}, error)
- func (q *ChanQueue) Capacity() int32
- func (q *ChanQueue) Close() error
- func (q *ChanQueue) ForceClose() error
- func (q *ChanQueue) IsClosed() bool
- func (q *ChanQueue) IsFull() bool
- func (q *ChanQueue) Length() int32
- func (q *ChanQueue) Pop() (val interface{}, err error)
- func (q *ChanQueue) Push(x interface{}) error
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChanQueue ¶
type ChanQueue struct {
// contains filtered or unexported fields
}
ChanQueue use chan queue
func (*ChanQueue) ForceClose ¶
type Queue ¶
type Queue interface { // Push 阻塞写队列 Push(data interface{}) error // AsyncPush 异步非阻塞写队列 AsyncPush(data interface{}) error // Pop 阻塞读队列 Pop() (interface{}, error) //AutoPop 批量获取阻塞读队列 AutoPop() ([]interface{}, error) // AsyncPop 异步读队列 AsyncPop() (interface{}, error) // Capacity 队列大小 Capacity() int32 // Length 队列占用数量 Length() int32 // Close 关闭队列 Close() error // 强制关闭 ForceClose() error // IsClosed 队列是否已经关闭 关闭返回true,否则返回false IsClosed() bool }
Queue interface define
Click to show internal directories.
Click to hide internal directories.