ClientMode

sealed interface ClientMode

How a client calls a peer, and as whom:

  • Service: on the peer's internal port (Port.INTERNAL), as this service, which it names in Wow-Service, asserting the caller it acts for as the root context of Wow-Call: its tenant, scope, operator and the request facts that propagate (the application, app_id). The peer takes that assertion from a service that names itself alone, its internal port being reachable by the platform's own pods only, and lets it call the commands and read the models its wow.callers.<service> entries permit. A command is answered once committed, whatever its wait plan: the internal port does not stream.

  • User: on the peer's public routes (Port.PUBLIC), forwarding the end user's credential (UserCredential): the peer authenticates the user as its own edge would, and the caller a client was given (me.ahoo.wow.api.client. CommandClient.of) only chooses which credential to forward. Waits and streams are the public port's.

Inheritors

Types

Link copied to clipboard
class Service(val service: String?) : ClientMode

Calls the internal port as the service named service, asserting the root context (ClientMode); a client that names no service is refused by every peer.

Link copied to clipboard
class User(val credential: UserCredential) : ClientMode

Calls the public routes, forwarding the end user's credential (ClientMode).

Properties

Link copied to clipboard
abstract val port: Port

The port of the peer this mode calls.