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 forward this node cannot read is refused, never answered 400: one larger than the port's codecs take (Refusal.TOO_LARGE), one of a format it does not read (Refusal.UNKNOWN_FORMAT, ClusterCodec) and a body that is not a forward (Refusal.MALFORMED). This node surely did not run it, so its sender runs it. A body of signals that is not one, or holds a signal of a format this node does not read, is answered 400, and one larger than the port takes 413: the sender sends a batch so refused again in parts (HttpSignalSender). 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.