summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-09 23:26:24 +0300
committerValery Piashchynski <[email protected]>2021-08-09 23:26:59 +0300
commitd379c28a1e9babead0266bc4fa10d6c5e7aa14cb (patch)
tree8e939b38c9ddd0d6a71f9d99a53fae067608dd0c /pkg
parent0f16b25156cf98357865945d1c3bd5a038853c60 (diff)
Add initial support for the php worker protocol.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/priority_queue/binary_heap_test.go4
-rw-r--r--pkg/priority_queue/interface.go3
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/priority_queue/binary_heap_test.go b/pkg/priority_queue/binary_heap_test.go
index 663741ad..21167051 100644
--- a/pkg/priority_queue/binary_heap_test.go
+++ b/pkg/priority_queue/binary_heap_test.go
@@ -20,6 +20,10 @@ func (t Test) Nack() error {
return nil
}
+func (t Test) Requeue(_ uint32) error {
+ return nil
+}
+
func (t Test) Body() []byte {
return nil
}
diff --git a/pkg/priority_queue/interface.go b/pkg/priority_queue/interface.go
index d64aaf3d..eee2a090 100644
--- a/pkg/priority_queue/interface.go
+++ b/pkg/priority_queue/interface.go
@@ -25,4 +25,7 @@ type Item interface {
// Nack - discard the Item
Nack() error
+
+ // Requeue - put the message back to the queue with the optional delay
+ Requeue(delay uint32) error
}