interface CircuitBreakerPolicy
Since 0.1.0

Circuit breaker policy consumed by the ResiliencePlugin's breaker pattern.

Properties

readonly
threshold: number

Failures within the timeout window that trip the breaker open.

readonly
timeout: number

Rolling failure window in milliseconds; failures older than this (measured by the monotonic clock) are dropped before the threshold check.

readonly
resetTimeout: number

Cooldown in milliseconds before an open breaker moves to half-open.

Usage

import { type CircuitBreakerPolicy } from "sdk/src/index.ts";