summaryrefslogtreecommitdiff
path: root/pkg/priority_queue/interface.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-03 15:19:48 +0300
committerValery Piashchynski <[email protected]>2021-07-03 15:19:48 +0300
commit677db79f76fcc566bee2b1b51d0f40a0c9f2ac19 (patch)
tree7c02179dd4b7927e2c01734ba8ee3b5b63ff831b /pkg/priority_queue/interface.go
parente4834e08dcf5885623091bbe5e7e75e7950a07f3 (diff)
- Initial binary_heap
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/priority_queue/interface.go')
-rw-r--r--pkg/priority_queue/interface.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/priority_queue/interface.go b/pkg/priority_queue/interface.go
index 00998d78..45430486 100644
--- a/pkg/priority_queue/interface.go
+++ b/pkg/priority_queue/interface.go
@@ -1,6 +1,11 @@
package priorityqueue
type Queue interface {
- Push(item interface{})
- Pop() interface{}
+ Push(item PQItem)
+ Pop() PQItem
+}
+
+type PQItem interface {
+ ID() string
+ Priority() uint64
}