Skip to content

Commit

Permalink
feature: add PeakPriority to the Queue interface
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Feb 13, 2023
1 parent 9abd0f4 commit a0fcdce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/v1/priority_queue/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package priorityqueue

// Queue is a binary heap interface
type Queue interface {
// PeekPriority returns the highest priority
PeekPriority() int64
// Insert adds an item to the queue
Insert(item Item)
// ExtractMin returns the item with the lowest priority
// ExtractMin returns the item with the highest priority (less value is the highest priority)
ExtractMin() Item
// Len returns the number of items in the queue
Len() uint64
Expand Down

0 comments on commit a0fcdce

Please sign in to comment.