blob: 6738ed46ba6111c62f658fdcbe5715eb732d6b39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package jobs
import (
"github.com/spiral/roadrunner/v2/pkg/priorityqueue"
"github.com/spiral/roadrunner/v2/plugins/jobs/pipeline"
"github.com/spiral/roadrunner/v2/plugins/jobs/structs"
)
// Consumer todo naming
type Consumer interface {
Push(job *structs.Job) (*string, error)
PushBatch(job *[]structs.Job) (*string, error)
Consume(job *pipeline.Pipeline)
Stop(pipeline string)
StopAll()
Resume(pipeline string)
ResumeAll()
Register(pipe string) error
Stat()
}
type Constructor interface {
JobsConstruct(configKey string, queue priorityqueue.Queue) (Consumer, error)
}
|