public final class DnsServiceEndpointGroup extends DynamicEndpointGroup
DynamicEndpointGroup which resolves targets using DNS
SRV records. This is useful for environments
where service discovery is handled using DNS, e.g.
Kubernetes DNS-based service
discovery.| Modifier and Type | Method and Description |
|---|---|
static DnsServiceEndpointGroupBuilder |
builder(String hostname)
Returns a new
DnsServiceEndpointGroupBuilder with the specified hostname. |
void |
close()
Stops polling DNS servers for service updates.
|
static DnsServiceEndpointGroup |
of(String hostname)
Creates a
DnsServiceEndpointGroup that schedules queries on a random EventLoop from
CommonPools.workerGroup(). |
addEndpoint, endpoints, initialEndpointsFuture, removeEndpoint, setEndpointsaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, of, of, orElse, removeListenerpublic static DnsServiceEndpointGroup of(String hostname)
DnsServiceEndpointGroup that schedules queries on a random EventLoop from
CommonPools.workerGroup().hostname - the hostname to query DNS queries for.public static DnsServiceEndpointGroupBuilder builder(String hostname)
DnsServiceEndpointGroupBuilder with the specified hostname.hostname - the hostname to query DNS queries forpublic final void close()
close in interface EndpointGroupclose in interface SafeCloseableclose in interface AutoCloseableclose in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.