github.com/blend/go-sdk@v1.20220411.3/breaker/counts.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package breaker 9 10 // Counts holds the numbers of requests and their successes/failures. 11 // CircuitBreaker clears the internal Counts either 12 // on the change of the state or at the closed-state intervals. 13 // Counts ignores the results of the requests sent before clearing. 14 type Counts struct { 15 Requests int64 `json:"requests"` 16 TotalSuccesses int64 `json:"totalSuccesses"` 17 TotalFailures int64 `json:"totalFailures"` 18 ConsecutiveSuccesses int64 `json:"consecutiveSuccesses"` 19 ConsecutiveFailures int64 `json:"consecutiveFailures"` 20 }