Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQueueCap = errors.New("queue capacity must large than 0")
ErrQueueCap 初始化 容量太小
View Source
var ErrQueueEmpty = errors.New("queue empty")
ErrQueueEmpty .
View Source
var ErrQueueOverflow = errors.New("queue capacity overflow")
ErrQueueOverflow 容量容量已慢
Functions ¶
This section is empty.
Types ¶
type IQueue ¶
type IQueue interface { // PushBack 壓入 隊列 尾 失敗 通常返回 ErrQueueOverflow PushBack(val interface{}) (e error) // PushFront 壓入 隊列 頭 失敗 通常返回 ErrQueueOverflow PushFront(val interface{}) (e error) // PopBack 從 隊列 尾 出棧 如果為空 返回 nil,ErrQueueEmpty PopBack() (val interface{}, e error) // PopFront 從 隊列 頭 出棧 如果為空 返回 nil,ErrQueueEmpty PopFront() (val interface{}, e error) // Back 返回 隊列 尾 如果為空 返回 nil,ErrQueueEmpty Back() (val interface{}, e error) // Front 返回 隊列 頭 如果為空 返回 nil,ErrQueueEmpty Front() (val interface{}, e error) // Cap 返回 隊列 容量 Cap() int // Len 返回 隊列 大小 Len() int // Reset 重置 隊列 Reset() // 遍歷 隊列 Each(func(val interface{})) // 返回隊列是否爲空 IsEmpty() bool // 返回隊列是否已滿 IsFill() bool }
IQueue 隊列 定義
Click to show internal directories.
Click to hide internal directories.