Package burp.mcp.util
Class CircuitBreaker
java.lang.Object
burp.mcp.util.CircuitBreaker
Circuit breaker for external-calling tools.
Tracks failures in a sliding 60s window. After 5 consecutive failures,
opens the circuit for 30s, then allows one probe request.
-
Constructor Details
-
CircuitBreaker
-
-
Method Details
-
allowRequest
Called before executing the tool. Returns null if allowed, or an error message if the circuit is open. -
recordSuccess
public void recordSuccess()Called when a tool call succeeds. -
recordFailure
public void recordFailure()Called when a tool call fails. -
reset
public void reset() -
getState
-
getToolName
-
getTotalFailures
public long getTotalFailures() -
getTotalTrips
public long getTotalTrips()
-