summaryrefslogtreecommitdiff
path: root/pkg/worker_watcher/container/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker_watcher/container/interface.go')
-rw-r--r--pkg/worker_watcher/container/interface.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/worker_watcher/container/interface.go b/pkg/worker_watcher/container/interface.go
new file mode 100644
index 00000000..532bace9
--- /dev/null
+++ b/pkg/worker_watcher/container/interface.go
@@ -0,0 +1,13 @@
+package container
+
+import "github.com/spiral/roadrunner/v2/pkg/worker"
+
+// Vector interface represents vector container
+type Vector interface {
+ // Enqueue used to put worker to the vector
+ Enqueue(worker.BaseProcess)
+ // Dequeue used to get worker from the vector
+ Dequeue() (worker.BaseProcess, bool)
+ // Destroy used to stop releasing the workers
+ Destroy()
+}