API Reference
health(conditions, *, success_handler=default_handler, failure_handler=default_handler, success_status=200, failure_status=503)
Create a health check route.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conditions |
List[Callable[..., Dict[str, Any] | bool]]
|
A list of callables that represents the condition of your service. |
required |
success_handler |
Callable[..., Awaitable[dict]]
|
A callable which receives
the |
default_handler
|
failure_handler |
Callable[..., Awaitable[dict]]
|
A callable analogous to
|
default_handler
|
success_status |
int
|
An integer that overwrites the default status ( |
200
|
failure_status |
int
|
An integer that overwrites the default status ( |
503
|
Returns:
Type | Description |
---|---|
Callable[..., Coroutine[None, None, JSONResponse]]
|
Callable[..., Awaitable[JSONResponse]]: The health check route. |