Skip to content

Commit

Permalink
Merge pull request #1909 from murgatroid99/grpc-js-xds_log_bootstrap_…
Browse files Browse the repository at this point in the history
…master

grpc-js-xds: Log loaded bootstrap info in xDS client (master)
  • Loading branch information
murgatroid99 authored Sep 20, 2021
2 parents 32fc824 + cfcc491 commit aeb4273
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/grpc-js-xds/src/xds-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ export class XdsClient {
if (this.hasShutdown) {
return;
}
trace('Loaded bootstrap info: ' + JSON.stringify(bootstrapInfo, undefined, 2));
if (bootstrapInfo.xdsServers[0].serverFeatures.indexOf('xds_v3') >= 0) {
this.apiVersion = XdsApiVersion.V3;
} else {
Expand Down Expand Up @@ -370,6 +371,13 @@ export class XdsClient {
...nodeV3,
client_features: ['envoy.lrs.supports_send_all_clusters'],
};
if (this.apiVersion === XdsApiVersion.V2) {
trace('ADS Node: ' + JSON.stringify(this.adsNodeV2, undefined, 2));
trace('LRS Node: ' + JSON.stringify(this.lrsNodeV2, undefined, 2));
} else {
trace('ADS Node: ' + JSON.stringify(this.adsNodeV3, undefined, 2));
trace('LRS Node: ' + JSON.stringify(this.lrsNodeV3, undefined, 2));
}
const credentialsConfigs = bootstrapInfo.xdsServers[0].channelCreds;
let channelCreds: ChannelCredentials | null = null;
for (const config of credentialsConfigs) {
Expand Down

0 comments on commit aeb4273

Please sign in to comment.