summaryrefslogtreecommitdiff
path: root/internal/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config.go')
-rw-r--r--internal/config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/config.go b/internal/config.go
index 9d43e5c..ccc3f36 100644
--- a/internal/config.go
+++ b/internal/config.go
@@ -15,6 +15,7 @@ type config struct {
StateDir string `json:"StateDir,omitempty"`
CheckTimeoutS int
CheckConcurrency int
+ StaleThreshold int `json:"StaleThreshold,omitempty"`
Checks map[string]check
}
@@ -51,6 +52,10 @@ func newConfig(configFile string) (config, error) {
log.Println("Set StateDir to " + conf.StateDir)
}
+ if conf.StaleThreshold == 0 {
+ conf.StaleThreshold = 3600 // Default to 1 hour
+ }
+
return conf, nil
}