From fc8cbcafa527896151009cc36392a91af4978d37 Mon Sep 17 00:00:00 2001 From: Tyler Koenig Date: Fri, 12 Jun 2026 14:30:48 -0400 Subject: [PATCH] docs(monitor): document before-Start contract on engine setters --- internal/monitor/monitor.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/monitor/monitor.go b/internal/monitor/monitor.go index 63a12bd..779667c 100644 --- a/internal/monitor/monitor.go +++ b/internal/monitor/monitor.go @@ -115,10 +115,14 @@ func newEngine(s store.Store, allowPrivateTargets bool) *Engine { } } +// SetInsecureSkipVerify must be called before Start: the field is read by +// checker goroutines without synchronization. func (e *Engine) SetInsecureSkipVerify(skip bool) { e.insecureSkipVerify = skip } +// SetMaintRetention must be called before Start: the field is read by the +// maintenance prune goroutine without synchronization. func (e *Engine) SetMaintRetention(d time.Duration) { e.maintRetention = d } @@ -1043,6 +1047,8 @@ func (e *Engine) EnqueueProbeCheck(siteID int, nodeID string, latencyNs int64, i e.enqueueWrite(writeProbeCheck{siteID: siteID, nodeID: nodeID, latencyNs: latencyNs, isUp: isUp}) } +// SetAggStrategy must be called before Start: the field is read by the probe +// aggregation path without synchronization. func (e *Engine) SetAggStrategy(strategy AggregationStrategy) { e.aggStrategy = strategy }