summaryrefslogtreecommitdiff
path: root/common/jobs/interface.go
blob: deb90cde2d48ceaea4b6bdb4b6ac0c795b621289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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) error
	Register(pipeline *pipeline.Pipeline) error
	List() []*pipeline.Pipeline

	Pause(pipeline string)
	Resume(pipeline string)
}

type Constructor interface {
	JobsConstruct(configKey string, queue priorityqueue.Queue) (Consumer, error)
}