CommandCaller

fun interface CommandCaller

The client of the other contexts' HTTP command gateways, which the host gives a node, a port the runtime consumes and wow-client's HttpCommandCaller implements: it sends a call to the gateway of its command's context, at the address the host configures for it, and returns the result the target answers, at COMMITTED: SUCCEEDED, REJECTED or FAILED. It throws a WowProblemException when it reaches no result (the target down, unreachable or late, no address for the context), retryable with the same request id.

Functions

Link copied to clipboard
abstract suspend fun call(call: OutgoingCall): CommandResult
Link copied to clipboard
open fun reaches(context: String): Boolean

Whether it knows where to call context's gateway: a node whose sagas call a context its caller does not reach is not built. The default answers true; the host's HTTP caller (wow-client's HttpCommandCaller) answers whether its endpoints give context an internal URL.