AniLink - v3.0.0
    Preparing search index...

    Function recordCircuitSuccess

    • Resets the failure streak after a successful attempt. When the success is the reserved post-cooldown probe, clears the half-open state and closes the breaker, emitting onCircuitClose so dashboards can plot recovery. Closing also resets the failed-probe counter, so the next open period starts from the configured cooldown again instead of inheriting the previous period's probe backoff.

      Parameters

      • circuit: CircuitState | undefined

        The caller's breaker state, when the breaker is enabled.

      • resolved: ResolvedRequestOptions

        The resolved request options, for the onCircuitClose hook.

      • hookContext: RequestContext

        The request context, for the onCircuitClose hook.

      • host: string

        The upstream host scope, for the onCircuitClose hook.

      Returns void

      Nothing; mutates the breaker state in place.