PeerClients

class PeerClients(modes: Map<String, PeerMode>, local: Set<String>, contracts: Set<String>, service: Lazy<WowClient>, user: Lazy<WowClient>, defaultMode: PeerMode, val serviceName: String, val described: Set<String> = emptySet())

The peer contexts the service reaches over HTTP (routing moved here from the host): each context of modes by the client of its mode, service or user. Every context of modes must be a peer the contracts on the class path declare (contracts), not one of the service's own, unless it is one of described, the peers described by their Manifest alone (contract: manifest), which no contract on the class path may declare.

Constructors

Link copied to clipboard
constructor(modes: Map<String, PeerMode>, local: Set<String>, contracts: Set<String>, service: Lazy<WowClient>, user: Lazy<WowClient>, defaultMode: PeerMode, serviceName: String, described: Set<String> = emptySet())

Properties

Link copied to clipboard

The client in defaultMode.

Link copied to clipboard

The peer contexts reached over HTTP.

Link copied to clipboard

The contexts of modes described by their Manifest alone.

Link copied to clipboard

The service's own name, its Manifest's: the identity a subscription handler reads a peer as (RoutedQueryApi.tenant).

Functions

Link copied to clipboard
fun clientOf(context: String): WowClient

The client of context's mode; the default one for a context not reached over HTTP.

Link copied to clipboard
fun reaches(context: String): Boolean

Whether context is reached over HTTP.