blob: a2cf6ed990a60572d3ee2b845d8deb78a4f84996 (
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
|
package jobs
import (
priorityqueue "github.com/spiral/roadrunner/v2/common/priority_queue"
"github.com/spiral/roadrunner/v2/plugins/jobs/pipeline"
"github.com/spiral/roadrunner/v2/plugins/jobs/structs"
)
// Consumer todo naming
type Consumer interface {
Push(*structs.Job) (string, error)
Stat()
Consume(*pipeline.Pipeline)
Register(pipe string) error
}
type Broker interface {
InitJobBroker(queue priorityqueue.Queue) (Consumer, error)
}
type Item interface {
ID() string
Payload() []byte
}
|