MCPcopy
hub / github.com/PatchMon/PatchMon / SetReportOffset

Method SetReportOffset

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

SetReportOffset sets the report offset (in seconds) and saves it to config file

(offsetSeconds int)

Source from the content-addressed store, hash-verified

414
415// SetReportOffset sets the report offset (in seconds) and saves it to config file
416func (m *Manager) SetReportOffset(offsetSeconds int) error {
417 if offsetSeconds < 0 {
418 return fmt.Errorf("invalid report offset: %d (must be >= 0)", offsetSeconds)
419 }
420 m.config.ReportOffset = offsetSeconds
421 return m.SaveConfig()
422}
423
424// SetPackageCacheRefresh sets the package cache refresh mode and max age, and saves to config file
425func (m *Manager) SetPackageCacheRefresh(mode string, maxAge int) error {

Callers 1

runServiceLoopFunction · 0.80

Calls 1

SaveConfigMethod · 0.95

Tested by

no test coverage detected