Class DnsServiceDiscoverers
java.lang.Object
io.servicetalk.dns.discovery.netty.DnsServiceDiscoverers
A factory to create DNS
ServiceDiscoverers
.-
Method Summary
Modifier and TypeMethodDescriptionstatic DnsServiceDiscovererBuilder
A newDnsServiceDiscovererBuilder
instance.Get theServiceDiscoverer
that executes DNS lookups for A/ AAAA records for providedHostAndPort.hostName()
with a fixedHostAndPort.port()
.Get theServiceDiscoverer
that executes DNS lookups for SRV records for provided service name as aString
.
-
Method Details
-
builder
A newDnsServiceDiscovererBuilder
instance.The returned builder can be customized using
DnsServiceDiscovererBuilderProvider
.- Parameters:
id
- a (unique) ID to identify the createdServiceDiscoverer
.- Returns:
- a new
DnsServiceDiscovererBuilder
.
-
globalARecordsDnsServiceDiscoverer
public static ServiceDiscoverer<HostAndPort,InetSocketAddress, globalARecordsDnsServiceDiscoverer()ServiceDiscovererEvent<InetSocketAddress>> Get theServiceDiscoverer
that executes DNS lookups for A/ AAAA records for providedHostAndPort.hostName()
with a fixedHostAndPort.port()
.The returned instance can be customized using
DnsServiceDiscovererBuilderProvider
by targeting "global-a" identity.The lifecycle of this instance shouldn't need to be managed by the user. The returned instance of
ServiceDiscoverer
must not be closed.- Returns:
- the singleton instance
-
globalSrvRecordsDnsServiceDiscoverer
public static ServiceDiscoverer<String,InetSocketAddress, globalSrvRecordsDnsServiceDiscoverer()ServiceDiscovererEvent<InetSocketAddress>> Get theServiceDiscoverer
that executes DNS lookups for SRV records for provided service name as aString
.The returned instance can be customized using
DnsServiceDiscovererBuilderProvider
by targeting "global-srv" identity.The lifecycle of this instance shouldn't need to be managed by the user. The returned instance of
ServiceDiscoverer
must not be closed.- Returns:
- the singleton instance
-