summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-05 18:44:29 +0300
committerValery Piashchynski <[email protected]>2021-07-05 18:44:29 +0300
commit207739f7346c98e16087547bc510e1f909671260 (patch)
tree5c6eac27beb4eb5e127c7d8dae3464edb3359be9 /common
parent300166eda7b138847008a7653f90753bd8397b9e (diff)
- Update PQ
- Update ephemeral plugin, complete Push - Add Jobs full configuration Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'common')
-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
+}