thresholdChan returns the current threshold-change notification channel. Heartbeat goroutines select on this to detect runtime stale-threshold updates.
()
| 184 | // channel. Heartbeat goroutines select on this to detect runtime |
| 185 | // stale-threshold updates. |
| 186 | func (s *Service) thresholdChan() <-chan struct{} { |
| 187 | s.thresholdMu.Lock() |
| 188 | defer s.thresholdMu.Unlock() |
| 189 | return s.thresholdChanged |
| 190 | } |
| 191 | |
| 192 | // staleThreshold returns the current stale timeout. |
| 193 | func (s *Service) staleThreshold() time.Duration { |
no test coverage detected