summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index c404284..90435e5 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -12,9 +12,10 @@ import (
)
type Config struct {
- StateDir string
- Address string
- Nodes []string
+ StateDir string
+ Address string
+ Nodes []string
+ LoopIntervalS int64 `json:"LoopIntervalS,omitempty"`
}
func New(configFile string) (Config, error) {
@@ -36,6 +37,12 @@ func New(configFile string) (Config, error) {
return c, err
}
+ if c.LoopIntervalS == 0 {
+ c.LoopIntervalS = 10
+ }
+
+ log.Println("config: using loop interval of", c.LoopIntervalS)
+
return c, nil
}