summaryrefslogtreecommitdiff
path: root/plugins/jobs/drivers/beanstalk/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/config.go')
-rw-r--r--plugins/jobs/drivers/beanstalk/config.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/plugins/jobs/drivers/beanstalk/config.go b/plugins/jobs/drivers/beanstalk/config.go
index caa683ab..f05ee122 100644
--- a/plugins/jobs/drivers/beanstalk/config.go
+++ b/plugins/jobs/drivers/beanstalk/config.go
@@ -17,6 +17,23 @@ func (c *GlobalCfg) InitDefault() {
}
}
-type Config struct{}
+type Config struct {
+ PipePriority int64 `mapstructure:"priority"`
+ TubePriority uint32 `mapstructure:"tube_priority"`
+ Tube string `mapstructure:"tube"`
+ ReserveTimeout time.Duration `mapstructure:"reserve_timeout"`
+}
+
+func (c *Config) InitDefault() {
+ if c.Tube == "" {
+ c.Tube = "default"
+ }
-func (c *Config) InitDefault() {}
+ if c.ReserveTimeout == 0 {
+ c.ReserveTimeout = time.Second * 5
+ }
+
+ if c.PipePriority == 0 {
+ c.PipePriority = 10
+ }
+}