Package-level declarations

Types

Link copied to clipboard

One calling service: the commands it may call, names or patterns (AddItem, shop.cart.*, wow.lifecycle.*): without them, the domain commands alone; a system command (wow.*: the lifecycle, the snapshot rebuild, the schedules) only when an entry naming wow. lists it; an entry naming a domain command narrows the domain commands to those listed. The reads narrow the models it may read on the internal port's read routes, by context.aggregate.model (ordering.order.snapshot, .events, .state) or a dataset's context.dataset, patterns with *: without them, every model the node serves.

Link copied to clipboard
class DnsPeerDiscovery(lookup: SrvLookup = JndiSrvLookup(), namespaceFile: Path = SERVICE_ACCOUNT_NAMESPACE) : PeerDiscovery

wow.peer.discovery=dns, the default: a peer service's nodes are the targets of the DNS SRV records name-template names after it, _internal._tcp.{service}-cluster.{namespace}.svc by default, each http://<target>:<port>. Kubernetes publishes one such record per pod behind a headless Service, whose targets resolve to the pods' IPs, the addresses their nodes advertise. A peer's {namespace} is its namespaces.<service>, else the node's own: namespace, else that of the pod's service account, from namespaceFile.

Link copied to clipboard

The HTTP edge: its routes and its error answers.

Link copied to clipboard
class JndiSrvLookup(resolvConf: Path = RESOLV_CONF, query: (name: String) -> List<SrvRecord> = Companion::records) : SrvLookup

The SRV lookup of the JDK's DNS provider (JNDI), with the search domains of the node's resolver: a name without a trailing dot is tried under each search domain of resolvConf and as given, the first that has records answering, as given first when it has at least the resolver's ndots dots (options ndots:n, 1 by default; Kubernetes gives its pods 5); a name with one is absolute. resolvConf is read once; it is absent on a developer's machine, where a name is tried as given alone.

Link copied to clipboard

How the node calls its peers over HTTP, whichever peer: one HTTP client, these settings.

Link copied to clipboard

How a problem a retry may get past is retried (me.ahoo.wow.client.RetryPolicy): a 429, a command's problem that keeps the request id, or a connection that could not be made.

Link copied to clipboard

One peer context: its internal port's base url (service mode), http://host:port of an address in its internal network, never its public port, which refuses calls; its public routes' base publicUrl (user mode); the mode it is called in, over wow.peer.mode; where its contract comes from (jar, or manifest for a peer called by its Manifest alone); and its timeout, over wow.peer.timeout.

Link copied to clipboard

A DNS SRV lookup: the records of name, as a resolver finds them.

Link copied to clipboard
data class SrvRecord(val priority: Int, val weight: Int, val port: Int, val target: String)

One SRV record: its priority, weight, port and target, the host name of a node.