xds: set client node.BuildVersion to gRPC version (#3140)

This commit is contained in:
Menghan Li
2019-11-07 09:59:00 -08:00
committed by GitHub
parent 2548a2203d
commit c2b74f7468
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ package client
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"os"
@ -40,6 +41,8 @@ const (
googleDefaultCreds = "google_default"
)
var gRPCVersion = fmt.Sprintf("gRPC-Go %s", grpc.Version)
// For overriding from unit tests.
var fileReadFunc = ioutil.ReadFile
@ -124,6 +127,7 @@ func NewConfig() *Config {
grpclog.Errorf("xds: jsonpb.Unmarshal(%v) failed during bootstrap: %v", string(v), err)
break
}
n.BuildVersion = gRPCVersion
config.NodeProto = n
case "xds_server":
xs := &xdsServer{}

View File

@ -39,6 +39,7 @@ var (
},
},
},
BuildVersion: gRPCVersion,
}
nilCredsConfig = &Config{
BalancerName: "trafficdirector.googleapis.com:443",