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/config.go | |
parent | 02fc3664f4ad97e03c8f3a641e7322362f78721c (diff) |
Beanstalk initial commit
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/config.go')
-rw-r--r-- | plugins/jobs/drivers/beanstalk/config.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/jobs/drivers/beanstalk/config.go b/plugins/jobs/drivers/beanstalk/config.go index d034d65c..caa683ab 100644 --- a/plugins/jobs/drivers/beanstalk/config.go +++ b/plugins/jobs/drivers/beanstalk/config.go @@ -1 +1,22 @@ package beanstalk + +import "time" + +type GlobalCfg struct { + Addr string `mapstructure:"addr"` + Timeout time.Duration `mapstructure:"timeout"` +} + +func (c *GlobalCfg) InitDefault() { + if c.Addr == "" { + c.Addr = "tcp://localhost:11300" + } + + if c.Timeout == 0 { + c.Timeout = time.Second * 30 + } +} + +type Config struct{} + +func (c *Config) InitDefault() {} |