ax(mining): replace prose struct comment with usage example on CircuitBreaker
AX principle 2: comments show HOW with real values, not WHAT the type already says in its name. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
0bb5287f4b
commit
8e9f18ac3e
1 changed files with 2 additions and 1 deletions
|
|
@ -49,7 +49,8 @@ func DefaultCircuitBreakerConfig() CircuitBreakerConfig {
|
|||
}
|
||||
}
|
||||
|
||||
// CircuitBreaker implements the circuit breaker pattern
|
||||
// cb := NewCircuitBreaker("github-api", DefaultCircuitBreakerConfig())
|
||||
// result, err := cb.Execute(func() (interface{}, error) { return fetchStats(ctx) })
|
||||
type CircuitBreaker struct {
|
||||
name string
|
||||
config CircuitBreakerConfig
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue