Closed octonato closed 5 years ago
We've reworked this under the idea that there are 3 functions involved on a ServiceLocator.lookup
call:
f1: String => Lookup
f2: Lookup => ResolvedTarget
f3: ResolvedTarget => URI
Only f1
and f3 fall under the responsibility of
lagom-akka-discovery-service-locatorwhile
f2is implemented by
ServiceDiscovery`.
The driver for the overhaul on this PR was to keep the settings affecting f1
and f3
separate:
f1
is will use portName
, protocolName
and the service name and will ignore the schemef3
is only interested in scheme
.With this separation in mind we decided to move away from:
service-name-mappings {
my-service-name {
service-name = my-service.default.svc.cluster.local
port-name = http
protocol = udp
scheme = https
}
}
in favor of:
service-name-mappings {
my-service-name {
## User can still overwrite the protocol and portName
lookup = _http._tcp.my-service.default.svc.cluster.local
## lookup = _http._tcp.my-service
scheme = http
}
}
Resolves #26