diff options
author | Valery Piashchynski <[email protected]> | 2021-07-19 17:21:34 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-19 17:21:34 +0300 |
commit | 9750751b268b3fe706b911c0322d2e6ae27e652f (patch) | |
tree | 5b734653a26a41adda14d3162b4f627d8e0f75b4 /plugins/jobs/drivers/beanstalk/plugin.go | |
parent | 02fc3664f4ad97e03c8f3a641e7322362f78721c (diff) |
Beanstalk initial commit
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/plugin.go')
-rw-r--r-- | plugins/jobs/drivers/beanstalk/plugin.go | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/plugins/jobs/drivers/beanstalk/plugin.go b/plugins/jobs/drivers/beanstalk/plugin.go index 2fea1c31..529d1474 100644 --- a/plugins/jobs/drivers/beanstalk/plugin.go +++ b/plugins/jobs/drivers/beanstalk/plugin.go @@ -9,6 +9,10 @@ import ( "github.com/spiral/roadrunner/v2/plugins/logger" ) +const ( + pluginName string = "beanstalk" +) + type Plugin struct { log logger.Logger cfg config.Configurer @@ -20,10 +24,24 @@ func (p *Plugin) Init(log logger.Logger, cfg config.Configurer) error { return nil } +func (p *Plugin) Serve() chan error { + return make(chan error) +} + +func (p *Plugin) Stop() error { + return nil +} + +func (p *Plugin) Name() string { + return pluginName +} + +func (p *Plugin) Available() {} + func (p *Plugin) JobsConstruct(configKey string, eh events.Handler, pq priorityqueue.Queue) (jobs.Consumer, error) { - return nil, nil + return NewBeanstalkConsumer(configKey, p.log, p.cfg, eh, pq) } func (p *Plugin) FromPipeline(pipe *pipeline.Pipeline, eh events.Handler, pq priorityqueue.Queue) (jobs.Consumer, error) { - return nil, nil + return FromPipeline(pipe, p.log, p.cfg, eh, pq) } |