Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { // Value represents any value Value interface{} // Priority represents priority of the signing reqeust Priority Priority }
Item is used to push to and pop value with priority
type Priority ¶
type Priority int
Priority of signing request
const ( // UnknownPriority represents an Unknown Priority signing request UnknownPriority Priority = iota // LowPriority represents an Low Priority signing request LowPriority // MediumPriority represents an Medium Priority signing request MediumPriority // HighPriority represents an High Priority signing request HighPriority )
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
PriorityQueue represents priority channels
func New ¶
func New(size int) *PriorityQueue
func (*PriorityQueue) Len ¶
func (q *PriorityQueue) Len(p Priority) (int, error)
Len returns length of the channel by priority
func (*PriorityQueue) LenAll ¶
func (q *PriorityQueue) LenAll() LenAll
LenAll returns lengths of all priority channels
func (*PriorityQueue) Pop ¶
func (q *PriorityQueue) Pop() Item
Pop returns appropriate item from the priority queue
func (*PriorityQueue) Push ¶
func (q *PriorityQueue) Push(i Item)
Push adds an item to the priority queue
Click to show internal directories.
Click to hide internal directories.