-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Description
Currently, we have a global singleton xDS client object defined here:
grpc-go/xds/internal/xdsclient/singleton.go
Line 103 in bb0d32f
| type clientRefCounted struct { |
As part of xDS client fallback [A71], we want to support multiple xDS client objects, keyed on the dial target for channels and a dedicated well-known key for servers.
We already maintain such a map of xDS client objects that is used only for testing purposes. This map is keyed on the bootstrap configuration to be used by the xDS client. See here for details. We would have to follow the same pattern to support multiple xDS client objects for fallback.
A bunch of functions would need to be modified to support this:
xdsclient.Newandxdslcient.NewWithConfigwould be modified to accept the key for the xDS client to be created
As mentioned earlier, the key for xDS-enabled clients would be the dial target and the key for xDS-enabled servers would a well known string.xdsclient.NewWithConfigForTestingandxdsclient.NewWithBootstrapContentsForTestingwould need to be modified to use the same map as used by the non-testing functions