summaryrefslogtreecommitdiff
path: root/plugins/jobs/drivers
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-18 11:32:44 +0300
committerValery Piashchynski <[email protected]>2021-07-18 11:32:44 +0300
commit9c51360f9119a4114bdcc21c8e61f0908a3c876d (patch)
treeea63a051931bbd8282d64478bbefa2f970fcc955 /plugins/jobs/drivers
parentf4feb30197843d05eb308081ee579d3a9e3d6206 (diff)
Started beanstalk driver. Add new Queue impl (not finished yet).
Fix bugs in the AMQP, update proto-api Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers')
-rw-r--r--plugins/jobs/drivers/amqp/consumer.go2
-rw-r--r--plugins/jobs/drivers/beanstalk/config.go1
-rw-r--r--plugins/jobs/drivers/beanstalk/consumer.go1
-rw-r--r--plugins/jobs/drivers/beanstalk/plugin.go29
4 files changed, 32 insertions, 1 deletions
diff --git a/plugins/jobs/drivers/amqp/consumer.go b/plugins/jobs/drivers/amqp/consumer.go
index 20dcef2a..6def138e 100644
--- a/plugins/jobs/drivers/amqp/consumer.go
+++ b/plugins/jobs/drivers/amqp/consumer.go
@@ -141,7 +141,7 @@ func FromPipeline(pipeline *pipeline.Pipeline, log logger.Logger, cfg config.Con
delayCache: make(map[string]struct{}, 100),
}
- // if no global section
+ // only global section
if !cfg.Has(pluginName) {
return nil, errors.E(op, errors.Str("no global amqp configuration, global configuration should contain amqp addrs"))
}
diff --git a/plugins/jobs/drivers/beanstalk/config.go b/plugins/jobs/drivers/beanstalk/config.go
new file mode 100644
index 00000000..d034d65c
--- /dev/null
+++ b/plugins/jobs/drivers/beanstalk/config.go
@@ -0,0 +1 @@
+package beanstalk
diff --git a/plugins/jobs/drivers/beanstalk/consumer.go b/plugins/jobs/drivers/beanstalk/consumer.go
new file mode 100644
index 00000000..d034d65c
--- /dev/null
+++ b/plugins/jobs/drivers/beanstalk/consumer.go
@@ -0,0 +1 @@
+package beanstalk
diff --git a/plugins/jobs/drivers/beanstalk/plugin.go b/plugins/jobs/drivers/beanstalk/plugin.go
new file mode 100644
index 00000000..2fea1c31
--- /dev/null
+++ b/plugins/jobs/drivers/beanstalk/plugin.go
@@ -0,0 +1,29 @@
+package beanstalk
+
+import (
+ "github.com/spiral/roadrunner/v2/common/jobs"
+ "github.com/spiral/roadrunner/v2/pkg/events"
+ priorityqueue "github.com/spiral/roadrunner/v2/pkg/priority_queue"
+ "github.com/spiral/roadrunner/v2/plugins/config"
+ "github.com/spiral/roadrunner/v2/plugins/jobs/pipeline"
+ "github.com/spiral/roadrunner/v2/plugins/logger"
+)
+
+type Plugin struct {
+ log logger.Logger
+ cfg config.Configurer
+}
+
+func (p *Plugin) Init(log logger.Logger, cfg config.Configurer) error {
+ p.log = log
+ p.cfg = cfg
+ return nil
+}
+
+func (p *Plugin) JobsConstruct(configKey string, eh events.Handler, pq priorityqueue.Queue) (jobs.Consumer, error) {
+ return nil, nil
+}
+
+func (p *Plugin) FromPipeline(pipe *pipeline.Pipeline, eh events.Handler, pq priorityqueue.Queue) (jobs.Consumer, error) {
+ return nil, nil
+}