execute

suspend fun <T> execute(block: suspend () -> T): T(source)

Executes an operation through the circuit breaker.

Return

The result of the operation

Parameters

block

The operation to execute

Throws

if the circuit is open

if the operation fails