withTimeout

abstract suspend fun withTimeout(duration: Duration): DurableFuture<T>

Creates a DurableFuture that throws a dev.restate.sdk.common.TimeoutException if this future doesn't complete before the provided timeout.