ShouldReportFailure returns true exactly once per failure streak — after the first failed Start() and before the streak ends (a successful Start() or Stop()). Subsequent calls return false until a new streak begins. Calling it when no failure is pending always returns false.
()
| 228 | // Start() or Stop()). Subsequent calls return false until a new streak |
| 229 | // begins. Calling it when no failure is pending always returns false. |
| 230 | func (s *StartableToolSet) ShouldReportFailure() bool { |
| 231 | s.mu.Lock() |
| 232 | defer s.mu.Unlock() |
| 233 | return s.startStreak.shouldReport() |
| 234 | } |
| 235 | |
| 236 | // ShouldReportListFailure returns true exactly once per Tools() listing-failure |
| 237 | // streak — after the first failed listing and before the streak ends (a |