v0.1.6 changed target check interval per stream, version info added, makefile added

This commit is contained in:
2025-07-07 18:20:46 -04:00
parent 069818bf3d
commit 80180f74a0
14 changed files with 272 additions and 66 deletions

View File

@ -17,7 +17,7 @@ type StreamConfig struct {
}
type StreamMonitorConfig struct {
CheckIntervalMs *int `toml:"check_interval_ms"`
CheckIntervalMs int `toml:"check_interval_ms"`
Targets []MonitorTarget `toml:"targets"`
}
@ -35,8 +35,8 @@ func (s *StreamConfig) GetTargets(defaultTargets []MonitorTarget) []MonitorTarge
}
func (s *StreamConfig) GetCheckInterval(defaultInterval int) int {
if s.Monitor != nil && s.Monitor.CheckIntervalMs != nil {
return *s.Monitor.CheckIntervalMs
if s.Monitor != nil && s.Monitor.CheckIntervalMs > 0 {
return s.Monitor.CheckIntervalMs
}
return defaultInterval
}