@nexartis/homeport-sdk - v1.2.16
    Preparing search index...

    Class CircuitBreaker

    Index
    • get currentState(): CircuitBreakerState

      Backward-compatible getter — returns the state of the first tracked endpoint, or a default closed state if no endpoints have been recorded yet.

      Returns CircuitBreakerState

      Prefer currentStateFor(url) for per-endpoint diagnostics.

    • get enabled(): boolean

      Whether the circuit breaker is enabled.

      Returns boolean

    • Check if a request to url is allowed through. Throws if circuit is open.

      Parameters

      • Optionalurl: string

      Returns void

    • Current circuit breaker state for the endpoint group that url belongs to (read-only, does not create entries).

      Parameters

      • url: string

      Returns CircuitBreakerState

    • Record a failed request — may trip the circuit open.

      Parameters

      • Optionalurl: string

      Returns void

    • Record a successful request — resets the failure counter.

      Parameters

      • Optionalurl: string

      Returns void

    • Reset all circuit states.

      Returns void