blob: e75034678d7872dfceacc6bc80684f25b9c7bf4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package worker_watcher //nolint:stylecheck
import (
"context"
"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(ctx context.Context) (worker.BaseProcess, error)
// Destroy used to stop releasing the workers
Destroy()
}
|