#9456·grpc-go

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.Client
  • lrsclient.LRSClient → lrsclient.Client

Alternatives Considered

  • Renaming the packages to xds (xds.Client) and lrs (lrs.Client): In grpc-go, the top-level google.golang.org/grpc/xds package already uses package xds, so naming the generic client package xds causes an import collision whenever both packages are imported in the same file. Keeping the xdsclient and lrsclient package names avoids that collision while still eliminating the stutter.
  • Keeping xdsclient.XDSClient and lrsclient.LRSClient as-is: Because internal/xds/clients is not yet exported publicly, updating internal callers now avoids locking in stuttering names in the public API.

Additional Context

Part of #9455.