Skip to content

Commit

Permalink
Review comments #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Jul 17, 2020
1 parent 33c1803 commit 542973a
Show file tree
Hide file tree
Showing 9 changed files with 1,813 additions and 1,701 deletions.
9 changes: 6 additions & 3 deletions xds/internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ func RegisterAPIClientBuilder(b APIClientBuilder) {
m[b.Version()] = b
}

// GetAPIClientBuilder returns the client builder registered for the provided
// getAPIClientBuilder returns the client builder registered for the provided
// xDS transport API version.
func GetAPIClientBuilder(version version.TransportAPI) APIClientBuilder {
func getAPIClientBuilder(version version.TransportAPI) APIClientBuilder {
if b, ok := m[version]; ok {
return b
}
Expand Down Expand Up @@ -212,7 +212,7 @@ type Options struct {

// Function to be overridden in tests.
var newAPIClient = func(apiVersion version.TransportAPI, cc *grpc.ClientConn, opts BuildOptions) (APIClient, error) {
cb := GetAPIClientBuilder(apiVersion)
cb := getAPIClientBuilder(apiVersion)
if cb == nil {
return nil, fmt.Errorf("no client builder for xDS API version: %v", apiVersion)
}
Expand All @@ -228,6 +228,9 @@ var newAPIClient = func(apiVersion version.TransportAPI, cc *grpc.ClientConn, op
// ClientConn.
//
// Implements UpdateHandler interface.
// TODO(easwars): Make a wrapper struct which implements this interface in the
// style of ccBalancerWrapper so that the Client type does not implement these
// exported methods.
type Client struct {
done *grpcsync.Event
opts Options
Expand Down
Loading

0 comments on commit 542973a

Please sign in to comment.