Class DnsServiceDiscoverers
java.lang.Object
io.servicetalk.dns.discovery.netty.DnsServiceDiscoverers
A factory to create DNS
ServiceDiscoverers.-
Method Summary
Modifier and TypeMethodDescriptionstatic DnsServiceDiscovererBuilderA newDnsServiceDiscovererBuilderinstance.Get theServiceDiscovererthat executes DNS lookups for A/ AAAA records for providedHostAndPort.hostName()with a fixedHostAndPort.port().Get theServiceDiscovererthat executes DNS lookups for SRV records for provided service name as aString.
-
Method Details
-
builder
A newDnsServiceDiscovererBuilderinstance.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 theServiceDiscovererthat executes DNS lookups for A/ AAAA records for providedHostAndPort.hostName()with a fixedHostAndPort.port().The returned instance can be customized using
DnsServiceDiscovererBuilderProviderby targeting "global-a" identity.The lifecycle of this instance shouldn't need to be managed by the user. The returned instance of
ServiceDiscoverermust not be closed.- Returns:
- the singleton instance
-
globalSrvRecordsDnsServiceDiscoverer
public static ServiceDiscoverer<String,InetSocketAddress, globalSrvRecordsDnsServiceDiscoverer()ServiceDiscovererEvent<InetSocketAddress>> Get theServiceDiscovererthat executes DNS lookups for SRV records for provided service name as aString.The returned instance can be customized using
DnsServiceDiscovererBuilderProviderby targeting "global-srv" identity.The lifecycle of this instance shouldn't need to be managed by the user. The returned instance of
ServiceDiscoverermust not be closed.- Returns:
- the singleton instance
-