Class NacosEndpointGroup
java.lang.Object
com.linecorp.armeria.common.util.AbstractListenable<List<Endpoint>>
com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
com.linecorp.armeria.client.nacos.NacosEndpointGroup
- All Implemented Interfaces:
EndpointGroup,EndpointSelector,AsyncCloseable,Listenable<List<Endpoint>>,ListenableAsyncCloseable,AutoCloseable
A Nacos-based
EndpointGroup implementation that retrieves the list of Endpoint from Nacos
using Nacos's HTTP Open API
and updates the Endpoints periodically.-
Method Summary
Modifier and TypeMethodDescriptionstatic NacosEndpointGroupBuilderReturns a newly-createdNacosEndpointGroupBuilderwith the specifiednacosUriandserviceNameto buildNacosEndpointGroupBuilder.protected voiddoCloseAsync(CompletableFuture<?> future) Override this method to release the resources held by thisEndpointGroupand complete the specifiedCompletableFuture.static NacosEndpointGroupReturns aNacosEndpointGroupwith the specifiedserviceName.toString()Methods inherited from class com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
addEndpoint, allowsEmptyEndpoints, builder, close, closeAsync, endpoints, isClosed, isClosing, latestValue, removeEndpoint, select, select, selectionStrategy, selectionTimeoutMillis, selectNow, setEndpoints, toString, toStringSelector, whenClosed, whenReadyMethods inherited from class com.linecorp.armeria.common.util.AbstractListenable
addListener, addListener, notifyListeners, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.linecorp.armeria.client.endpoint.EndpointGroup
addListener, addListener, orElse, removeListener
-
Method Details
-
of
Returns aNacosEndpointGroupwith the specifiedserviceName. -
builder
Returns a newly-createdNacosEndpointGroupBuilderwith the specifiednacosUriandserviceNameto buildNacosEndpointGroupBuilder.- Parameters:
nacosUri- the URI of Nacos API service, including the path up to but not including API version. (example: http://localhost:8848/nacos)
-
doCloseAsync
Description copied from class:DynamicEndpointGroupOverride this method to release the resources held by thisEndpointGroupand complete the specifiedCompletableFuture.- Overrides:
doCloseAsyncin classDynamicEndpointGroup
-
toString
- Overrides:
toStringin classDynamicEndpointGroup
-