summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.go b/config.go
index 929ca806..23f1afc8 100644
--- a/config.go
+++ b/config.go
@@ -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 {