toggle menu
http4k
6.9.0.0
jvm
switch theme
search in API
http4k-ops-resilience4j
/
org.http4k.filter
/
ResilienceFilters
/
TimeLimit
Time
Limit
object
TimeLimit
Provide simple timeout functionality. By default, reject with HTTP 504 after 1 second.
Members
Functions
invoke
Link copied to clipboard
operator
fun
invoke
(
timeLimiter
:
TimeLimiter
=
TimeLimiter.ofDefaults("TimeLimit")
,
onError
:
(
)
->
Response
=
{ Response(CLIENT_TIMEOUT.description("Time limit exceeded")) }
,
futureSupplier
:
(
(
)
->
Response
)
->
Future
<
Response
>
=
{ CompletableFuture.supplyAsync(it) }
)
:
Filter