diff --git a/pkg/mining/circuit_breaker.go b/pkg/mining/circuit_breaker.go index b3fb8bc..2dd3ba7 100644 --- a/pkg/mining/circuit_breaker.go +++ b/pkg/mining/circuit_breaker.go @@ -88,7 +88,7 @@ func (cb *CircuitBreaker) State() CircuitState { return cb.state } -// Execute runs the given function with circuit breaker protection +// result, err := cb.Execute(func() (interface{}, error) { return fetchStats(ctx) }) func (cb *CircuitBreaker) Execute(fn func() (interface{}, error)) (interface{}, error) { // Check if we should allow this request if !cb.allowRequest() {