go.charczuk.com@v0.0.0-20240327042549-bc490516bd1a/sdk/breaker/counts.go (about) 1 package breaker 2 3 // Counts holds the numbers of requests and their successes/failures. 4 // CircuitBreaker clears the internal Counts either 5 // on the change of the state or at the closed-state intervals. 6 // Counts ignores the results of the requests sent before clearing. 7 type Counts struct { 8 Requests uint64 `json:"requests"` 9 TotalSuccesses uint64 `json:"totalSuccesses"` 10 TotalFailures uint64 `json:"totalFailures"` 11 ConsecutiveSuccesses uint64 `json:"consecutiveSuccesses"` 12 ConsecutiveFailures uint64 `json:"consecutiveFailures"` 13 }