xds/clients: rename xdsclient.XDSClient to xdsclient.Client and lrsclient.LRSClient to lrsclient.Client
Author: dashpoleCreated Sep 30, 2026Updated Sep 30, 2026
Use case(s) - what problem will this feature solve?
In internal/xds/clients, the xdsclient and lrsclient packages currently export xdsclient.XDSClient and lrsclient.LRSClient. This causes package/type name stutter at every call site (xdsclient.XDSClient, lrsclient.LRSClient), which goes against standard Go naming conventions (https://go.dev/blog/package-names, https://google.github.io/styleguide/go/decisions#package-names).
Before moving internal/xds/clients to a public import path, we should clean up the type names so we don't lock in stuttering identifiers under a v1 compatibility guarantee.
Proposed Solution
Keep the existing xdsclient and lrsclient package names and rename the client types to Client:
xdsclient.XDSClient→xdsclient.Clientlrsclient.LRSClient→lrsclient.Client
Alternatives Considered
- Renaming the packages to
xds(xds.Client) andlrs(lrs.Client): Ingrpc-go, the top-levelgoogle.golang.org/grpc/xdspackage already usespackage xds, so naming the generic client packagexdscauses an import collision whenever both packages are imported in the same file. Keeping thexdsclientandlrsclientpackage names avoids that collision while still eliminating the stutter. - Keeping
xdsclient.XDSClientandlrsclient.LRSClientas-is: Becauseinternal/xds/clientsis not yet exported publicly, updating internal callers now avoids locking in stuttering names in the public API.
Additional Context
Part of #9455.
Source: grpc/grpc-go