Documentation ¶
Index ¶
- Variables
- func Run(c Call, lock sync.Locker, qu Queue)
- type Call
- type Capacity
- func (sq *Capacity) Add(elem any) error
- func (sq *Capacity) Empty() bool
- func (sq *Capacity) Find(fn IndexFunc) (any, int)
- func (sq *Capacity) Get(index int) any
- func (sq *Capacity) Len() int
- func (sq *Capacity) Peek() any
- func (sq *Capacity) Pop() any
- func (sq *Capacity) Push(elem any) error
- func (sq *Capacity) ToList() []any
- type Circular
- func (cr *Circular) Add(it any) error
- func (cr *Circular) Empty() bool
- func (cr *Circular) Find(fn IndexFunc) (any, int)
- func (cr *Circular) Len() int
- func (cr *Circular) Next(index int) (any, int)
- func (cr *Circular) Peek() any
- func (cr *Circular) Pop() any
- func (cr *Circular) Push(it any) error
- func (cr *Circular) Reset()
- type IPriority
- type IndexFunc
- type Linked
- func (lq *Linked) Add(val any) error
- func (lq *Linked) AddTail(val any) error
- func (lq *Linked) Cap() int
- func (lq *Linked) Empty() bool
- func (lq *Linked) Find(fn IndexFunc) (any, int)
- func (lq *Linked) Len() int
- func (lq *Linked) Peek() any
- func (lq *Linked) Pop() any
- func (lq *Linked) Push(val any) error
- func (lq *Linked) ToList() []any
- type Priority
- func (pq *Priority) Add(elem any) error
- func (pq *Priority) Empty() bool
- func (pq *Priority) Find(fn IndexFunc) (any, int)
- func (pq *Priority) Head() IPriority
- func (pq *Priority) Len() int
- func (pq *Priority) Peek() any
- func (pq *Priority) Pop() any
- func (pq *Priority) Push(x any) error
- func (pq *Priority) Remove(i int) any
- type Queue
- type ResetFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsFull = errors.New("is full")
View Source
var ErrIsReleased = errors.New("size is zero")
View Source
var PriorityType = reflect.TypeOf((*IPriority)(nil)).Elem()
Functions ¶
Types ¶
type Capacity ¶ added in v1.20.115
type Capacity struct {
// contains filtered or unexported fields
}
Capacity 固定长度的队列
func NewCapacity ¶ added in v1.20.115
type Circular ¶
type Circular struct {
// contains filtered or unexported fields
}
Circular 环型队列
func NewCircular ¶
type IPriority ¶ added in v1.3.58
func NewPriorityItem ¶ added in v1.3.58
type Linked ¶ added in v1.20.115
type Linked struct {
// contains filtered or unexported fields
}
Linked 链表式队列
type Priority ¶ added in v1.20.115
type Priority struct {
// contains filtered or unexported fields
}
Priority 优先级
func NewPriority ¶ added in v1.20.115
func NewPriority() *Priority
func (*Priority) Head ¶ added in v1.20.115
Head returns the first item of a Priority without removing it.
Click to show internal directories.
Click to hide internal directories.