WowInstanceMetadata

The metadata a Wow node's instance carries in a Spring Cloud service registry: the SERVICE it is a node of, and the INTERNAL_HOST and INTERNAL_PORT of the address it advertises to the nodes of its service, where its internal port takes its peers' calls, so the registry and the node's membership name one address. The keys have dashes, not dots: Consul takes no dot in a metadata key.

A node of a service with wow-spring-cloud on its class path registers them itself; an instance registered otherwise names them in its registry's own metadata configuration (spring.cloud.consul.discovery.metadata.*, eureka.instance.metadata-map.*, spring.cloud.nacos.discovery.metadata.*, ...).

Properties

Link copied to clipboard

The host of the node's internal address, wow.node.address's or its default; the instance's host when absent.

Link copied to clipboard

The port of the node's internal address.

Link copied to clipboard
const val SERVICE: String

The service the instance is a node of, its wow.service (else spring.application.name).

Functions

Link copied to clipboard
fun internalUrlOf(instance: ServiceInstance): URI?

The base URL of the internal port of instance, http://host:port: the host its metadata names, else the instance's own, and the port its metadata names; null when its metadata names no port.

Link copied to clipboard
fun of(service: String, address: String): Map<String, String>

The metadata of a node of service whose internal address is host:port or [ipv6]:port.