Pudu programming language
Menu

Std.Http.Server.Guard.circuitBreaker

1 declaration

fn

circuitBreaker: Int -> Int -> fn(Std.Http.Server.Route.Request, fn(Std.Http.Server.Route.Request) -> Std.Http.Response) -> Std.Http.Response

This is a callable function.

What it does

Circuit breaker middleware protecting downstream dependencies from cascading failure.

Trips open when consecutive 5xx errors reach `failureThreshold`, fast-failing with 503

for `resetTimeoutSeconds` before permitting a half-open probe request.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.

Back to Std.Http.Server.GuardSearch related declarations