Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue interface { Push(item interface{}) bool // queue 结尾put 数据, 如果失败返回false, 插入成功返回true Pop() (interface{}, bool) // 获取消息数据 Length() int64 // queue 长度 IsEmpty() bool // queue是否为空 PopMany(count int64) ([]interface{}, bool) // 获取多条消息数据 }
func NewRingQueue ¶ added in v1.2.1
func NewUnLockQueue ¶ added in v1.2.1
type UnLockQueue ¶ added in v1.2.1
type UnLockQueue struct {
// contains filtered or unexported fields
}
lock free queue
func (*UnLockQueue) IsEmpty ¶ added in v1.2.1
func (q *UnLockQueue) IsEmpty() bool
func (*UnLockQueue) Length ¶ added in v1.2.1
func (q *UnLockQueue) Length() int64
func (*UnLockQueue) Maxlen ¶ added in v1.2.1
func (q *UnLockQueue) Maxlen() uint64
func (*UnLockQueue) Pop ¶ added in v1.2.1
func (q *UnLockQueue) Pop() (val interface{}, ok bool)
get queue functions
func (*UnLockQueue) PopMany ¶ added in v1.2.1
func (q *UnLockQueue) PopMany(count int64) ([]interface{}, bool)
func (*UnLockQueue) Push ¶ added in v1.2.1
func (q *UnLockQueue) Push(val interface{}) bool
Push queue functions
Click to show internal directories.
Click to hide internal directories.