PeerTargets

One open discovery: the internal ports of a peer's nodes, in no particular order, which the client rotates through and fails over between. A target is the base URL of a node's internal port, http://host:port; a peer whose nodes advertise their pod IPs may be found by names that resolve to them, so a target is compared with a member's address by its resolved IP, never by its text.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
abstract suspend fun targetsOf(service: String, context: String): List<URI>

The targets of the peer service, which serves context; empty when none is found now, which fails the call. Asked on every request, so an answer may be cached, but not for longer than the discovery's own refresh.

Link copied to clipboard
open fun unreachable(service: String, context: String)

Hears that every target of service failed to connect, so the discovery may look again before it would.