summaryrefslogtreecommitdiff
path: root/common/priority_queue/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/priority_queue/interface.go')
-rw-r--r--common/priority_queue/interface.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/priority_queue/interface.go b/common/priority_queue/interface.go
new file mode 100644
index 00000000..c1774223
--- /dev/null
+++ b/common/priority_queue/interface.go
@@ -0,0 +1,15 @@
+package priorityqueue
+
+type Queue interface {
+ Insert(item Item)
+ GetMax() Item
+}
+
+type Item interface {
+ ID() string
+ Priority() uint64
+ Ack()
+ Nack()
+ Body() []byte
+ Context() []byte
+}