internalRoutes

fun internalRoutes(forward: ClusterChannelHandler, signals: (WaitSignal) -> Unit, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default), service: String? = null, standby: StandbyControl? = null): RouterFunction<ServerResponse>

The routes of the internal port:

A body that is not such a message is answered 400. A forward larger than the port's codecs take is refused (Refusal.TOO_LARGE): this node surely did not run it, so its sender runs it; such a signal is answered 413. A node's forward is its me.ahoo.wow.runtime.node.ServiceNode.forwardHandler, which hands a command to the endpoint of its context.

Each request names the service it comes from (Wow-Service), a statement the internal port takes on its network's word: the port is reachable by the platform's own pods alone. With service, this node's, a forward is taken only from a node of service, else answered 401 wow.auth.unauthenticated (it names none) or 403 wow.auth.forbidden (another one) before its body is read, so a node configured for another service's cluster is caught. A signal is taken from any service that names itself: a wait that crossed into another service is signalled by that service's nodes. Without service both routes take every request.

With standby, the node's operator routes of a migration's cut-over, from a node of service only: GET InternalHttp.STANDBY_PATH answers whether the node is on standby and its StandbyControl.Status; POST InternalHttp.ACTIVATE_PATH activates it, the body naming who activates it and why, {"by": "…", "reason": "…"} (by required, for the audit), and answers its standby after.


fun internalRoutes(forward: ClusterChannelHandler, registry: WaitRegistry, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default), service: String? = null, standby: StandbyControl? = null): RouterFunction<ServerResponse>

The routes of the internal port, its signals taken by registry, the waits started on this node.