with Bulkhead Or Fallback
suspend fun <T> withBulkheadOrFallback(config: BulkheadConfig = BulkheadConfig(), fallback: suspend (Exception) -> T, block: suspend () -> T): T(source)
Executes an operation with bulkhead protection and a fallback for rejection.
Return
the result of the operation or fallback
Parameters
config
bulkhead configuration
fallback
the fallback function called with the rejection exception
block
the primary operation to execute