Class XdsEndpointGroup

All Implemented Interfaces:
EndpointGroup, EndpointSelector, AsyncCloseable, Listenable<List<Endpoint>>, ListenableAsyncCloseable, AutoCloseable

@UnstableApi public final class XdsEndpointGroup extends DynamicEndpointGroup
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.