Class DnsTextEndpointGroup
java.lang.Object
com.linecorp.armeria.common.util.AbstractListenable<List<Endpoint>>
com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
com.linecorp.armeria.client.endpoint.dns.DnsTextEndpointGroup
- All Implemented Interfaces:
EndpointGroup
,EndpointSelector
,AsyncCloseable
,Listenable<List<Endpoint>>
,ListenableAsyncCloseable
,AutoCloseable
DynamicEndpointGroup
which resolves targets using DNS TXT
records. This is useful for
environments where service discovery is handled using DNS.-
Method Summary
Modifier and TypeMethodDescriptionstatic DnsTextEndpointGroupBuilder
Returns a newDnsTextEndpointGroupBuilder
with the specified hostname andFunction
mapping.protected void
doCloseAsync(CompletableFuture<?> future)
Stops polling DNS servers for service updates.static DnsTextEndpointGroup
Creates aDnsTextEndpointGroup
that schedules queries on a randomEventLoop
fromCommonPools.workerGroup()
.Methods inherited from class com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
addEndpoint, close, closeAsync, endpoints, isClosed, isClosing, removeEndpoint, select, selectionStrategy, selectNow, setEndpoints, whenClosed, whenReady
Methods inherited from class com.linecorp.armeria.common.util.AbstractListenable
addListener, notifyListeners, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.client.endpoint.EndpointGroup
addListener, orElse, removeListener
-
Method Details
-
of
public static DnsTextEndpointGroup of(String hostname, Function<byte[],@Nullable Endpoint> mapping)Creates aDnsTextEndpointGroup
that schedules queries on a randomEventLoop
fromCommonPools.workerGroup()
. -
builder
public static DnsTextEndpointGroupBuilder builder(String hostname, Function<byte[],@Nullable Endpoint> mapping)Returns a newDnsTextEndpointGroupBuilder
with the specified hostname andFunction
mapping. -
doCloseAsync
Stops polling DNS servers for service updates.- Overrides:
doCloseAsync
in classDynamicEndpointGroup
-