MCPcopy
hub / github.com/docker/docker-agent / ShouldReportFailure

Method ShouldReportFailure

pkg/tools/startable.go:230–234  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

228// Start() or Stop()). Subsequent calls return false until a new streak
229// begins. Calling it when no failure is pending always returns false.
230func (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

Calls 3

shouldReportMethod · 0.80
LockMethod · 0.45
UnlockMethod · 0.45