Class XdsEndpointGroup

java.lang.Object
com.linecorp.armeria.common.util.AbstractListenable<List<Endpoint>>
com.linecorp.armeria.xds.client.endpoint.XdsEndpointGroup
All Implemented Interfaces:
EndpointGroup, EndpointSelector, AsyncCloseable, Listenable<List<Endpoint>>, AutoCloseable

@UnstableApi public final class XdsEndpointGroup extends AbstractListenable<List<Endpoint>> implements EndpointGroup
Provides a simple EndpointGroup which listens to an xDS cluster to select endpoints. Listening to EDS can be done like the following:

 XdsBootstrap watchersStorage = XdsBootstrap.of(...);
 EndpointGroup endpointGroup = XdsEndpointGroup.of(watchersStorage, "my-cluster");
 WebClient client = WebClient.of(SessionProtocol.HTTP, endpointGroup);
 
Currently, all SocketAddresses of a ClusterLoadAssignment are aggregated to a list and added to this EndpointGroup. Features such as automatic TLS detection or locality based load balancing are not supported yet. Note that it is important to shut down the endpoint group to clean up resources for the provided XdsBootstrap.