From e787ac77bdb17b5f8e2531fd7a001248777a8d76 Mon Sep 17 00:00:00 2001 From: Derek Passen Date: Fri, 5 Jun 2026 15:40:07 -0400 Subject: [PATCH] expose record-success! and record-failure! on circuit breaker --- src/diehard/circuit_breaker.clj | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/diehard/circuit_breaker.clj b/src/diehard/circuit_breaker.clj index b7cdc78..4ceab54 100644 --- a/src/diehard/circuit_breaker.clj +++ b/src/diehard/circuit_breaker.clj @@ -76,3 +76,13 @@ on current state: * `:half-open` only allows some of execution requests" [^CircuitBreaker cb] (.tryAcquirePermit cb)) + +(defn record-success! + "Record a successful execution on this circuit breaker." + [^CircuitBreaker cb] + (.recordSuccess cb)) + +(defn record-failure! + "Record a failed execution on this circuit breaker." + [^CircuitBreaker cb] + (.recordFailure cb))