Skip to content

Commit a0fcdce

Browse files
committed
feature: add PeakPriority to the Queue interface
Signed-off-by: Valery Piashchynski <[email protected]>
1 parent 9abd0f4 commit a0fcdce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/v1/priority_queue/interface.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ package priorityqueue
22

33
// Queue is a binary heap interface
44
type Queue interface {
5+
// PeekPriority returns the highest priority
6+
PeekPriority() int64
57
// Insert adds an item to the queue
68
Insert(item Item)
7-
// ExtractMin returns the item with the lowest priority
9+
// ExtractMin returns the item with the highest priority (less value is the highest priority)
810
ExtractMin() Item
911
// Len returns the number of items in the queue
1012
Len() uint64

0 commit comments

Comments
 (0)