summaryrefslogtreecommitdiff
path: root/plugins/jobs/brokers/amqp/consumer.go
blob: 0b8a5a5ba41a00ccb47af38ec98fd4fa6ae5533b (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package amqp

import (
	"github.com/spiral/roadrunner/v2/common/jobs"
	"github.com/spiral/roadrunner/v2/pkg/priorityqueue"
	"github.com/spiral/roadrunner/v2/plugins/config"
	"github.com/spiral/roadrunner/v2/plugins/jobs/pipeline"
	"github.com/spiral/roadrunner/v2/plugins/jobs/structs"
	"github.com/spiral/roadrunner/v2/plugins/logger"
)

type Config struct {
	Addr  string
	Queue string
}

type JobsConsumer struct {
	log logger.Logger
	pq  priorityqueue.Queue
}

func NewAMQPConsumer(configKey string, log logger.Logger, cfg config.Configurer, pq priorityqueue.Queue) (jobs.Consumer, error) {
	jb := &JobsConsumer{
		log: log,
		pq:  pq,
	}

	return jb, nil
}

func (j JobsConsumer) Push(job *structs.Job) error {
	panic("implement me")
}

func (j JobsConsumer) Register(pipeline *pipeline.Pipeline) error {
	panic("implement me")
}

func (j JobsConsumer) List() []*pipeline.Pipeline {
	panic("implement me")
}

func (j JobsConsumer) Pause(pipeline string) {
	panic("implement me")
}

func (j JobsConsumer) Resume(pipeline string) {
	panic("implement me")
}