RoutedCommandClient

class RoutedCommandClient(local: CommandClient, peers: PeerClients, aggregatesOf: (Class<*>) -> List<AggregateType>, caller: Caller = Caller.ANONYMOUS) : CommandClient

The service's CommandClient: a command to an aggregate of a peer context peers reach goes over HTTP, any other through local, the node's gateway (in process, or a peer's command topic). A request without a type goes to the one aggregatesOf (the node's models and the contracts on the class path) gives its command's class, a NamedCommand's to the one its type names.

Constructors

Link copied to clipboard
constructor(local: CommandClient, peers: PeerClients, aggregatesOf: (Class<*>) -> List<AggregateType>, caller: Caller = Caller.ANONYMOUS)

Functions

Link copied to clipboard
open override fun of(caller: Caller): CommandClient
Link copied to clipboard
open suspend override fun send(request: CommandRequest<*>): CommandResult
Link copied to clipboard
open override fun stream(request: CommandRequest<*>): Flow<CommandResult>
Link copied to clipboard
open suspend override fun wait(request: CommandRequest<*>): CommandResult