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. |
protected void |
doCloseAsync(CompletableFuture<?> future)
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, close, closeAsync, endpoints, isClosed, isClosing, removeEndpoint, select, selectionStrategy, setEndpoints, whenClosed, whenReadyaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, initialEndpointsFuture, of, of, 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 forprotected final void doCloseAsync(CompletableFuture<?> future)
doCloseAsync in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.