You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/circuitbreaker/doc.go
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,8 @@
12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
-
// Package circuitbreaker implements the circuit breaker.
16
-
//
17
-
// Sentinel circuit breaker module converts each Rule into a CircuitBreaker. Each CircuitBreaker has its own statistical structure.
15
+
// Package circuitbreaker implements the circuit breaker pattern, which provides
16
+
// stability and prevents cascading failures in distributed systems.
18
17
//
19
18
// Sentinel circuit breaker module supports three strategies:
20
19
//
@@ -23,13 +22,15 @@
23
22
// 2. ErrorRatio: the ratio of error entry exceeds the threshold. The following entry to resource will be broken.
24
23
// 3. ErrorCount: the number of error entry exceeds the threshold. The following entry to resource will be broken.
25
24
//
26
-
// Sentinel circuit breaker is implemented based on state machines. There are three state:
25
+
// Sentinel converts each circuit breaking Rule into a CircuitBreaker. Each CircuitBreaker has its own statistical structure.
26
+
//
27
+
// Sentinel circuit breaker is implemented based on state machines. There are three states:
27
28
//
28
29
// 1. Closed: all entries could pass checking.
29
30
// 2. Open: the circuit breaker is broken, all entries are blocked. After retry timeout, circuit breaker switches state to Half-Open and allows one entry to probe whether the resource returns to its expected state.
30
31
// 3. Half-Open: the circuit breaker is in a temporary state of probing, only one entry is allowed to access resource, others are blocked.
31
32
//
32
-
// Sentinel circuit breaker provides the listener to listen on the state changes.
33
+
// Sentinel circuit breaker provides the listener to observe events of state changes.
0 commit comments