diff options
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -25,6 +25,14 @@ type Config struct { DestroyTimeout time.Duration } +// InitDefaults allows to init blank config with pre-defined set of default values. +func (cfg *Config) InitDefaults() error { + cfg.AllocateTimeout = time.Minute + cfg.DestroyTimeout = time.Minute + + return nil +} + // Valid returns error if config not valid. func (cfg *Config) Valid() error { if cfg.NumWorkers == 0 { |