diff options
author | Valery Piashchynski <[email protected]> | 2021-06-23 17:41:51 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-23 17:41:51 +0300 |
commit | 521aeb823bc8fa1f0a91b540cbbac96328185f51 (patch) | |
tree | 9ec5f3fba0a4aa0469dd106040142c5e6b8cf144 /plugins/jobs/brokers/ephemeral/broker.go | |
parent | 7fc09959619e9e400ecafcffcd63e38812f397a6 (diff) |
- Add PQ (priority_queue) mock
- Add binary heap mock
- Connect first sub-plugin (ephemeral) with root jobs plugin
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/brokers/ephemeral/broker.go')
-rw-r--r-- | plugins/jobs/brokers/ephemeral/broker.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/jobs/brokers/ephemeral/broker.go b/plugins/jobs/brokers/ephemeral/broker.go new file mode 100644 index 00000000..905f5409 --- /dev/null +++ b/plugins/jobs/brokers/ephemeral/broker.go @@ -0,0 +1,30 @@ +package ephemeral + +import ( + priorityqueue "github.com/spiral/roadrunner/v2/pkg/priority_queue" + "github.com/spiral/roadrunner/v2/plugins/jobs/pipeline" + "github.com/spiral/roadrunner/v2/plugins/jobs/structs" +) + +type JobBroker struct { +} + +func NewJobBroker(q priorityqueue.Queue) (*JobBroker, error) { + return &JobBroker{}, nil +} + +func (j *JobBroker) Push(pipeline *pipeline.Pipeline, job *structs.Job) (string, error) { + panic("implement me") +} + +func (j *JobBroker) Stat() { + panic("implement me") +} + +func (j *JobBroker) Consume(pipeline *pipeline.Pipeline) { + panic("implement me") +} + +func (j *JobBroker) Register(pipeline *pipeline.Pipeline) { + panic("implement me") +} |