MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / SetUpdateInterval

Method SetUpdateInterval

agent-source-code/internal/config/config.go:407–413  ·  view source on GitHub ↗

SetUpdateInterval sets the update interval and saves it to config file

(interval int)

Source from the content-addressed store, hash-verified

405
406// SetUpdateInterval sets the update interval and saves it to config file
407func (m *Manager) SetUpdateInterval(interval int) error {
408 if interval <= 0 {
409 return fmt.Errorf("invalid update interval: %d (must be > 0)", interval)
410 }
411 m.config.UpdateInterval = interval
412 return m.SaveConfig()
413}
414
415// SetReportOffset sets the report offset (in seconds) and saves it to config file
416func (m *Manager) SetReportOffset(offsetSeconds int) error {

Callers 1

runServiceLoopFunction · 0.80

Calls 1

SaveConfigMethod · 0.95

Tested by

no test coverage detected