Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

feat: de-experiment google-c2p resolver #1896

Merged
merged 2 commits into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ && isOnComputeEngine()) {
GoogleDefaultChannelCredentials.newBuilder().callCredentials(callCreds).build();
isDirectPathXdsEnabled = Boolean.parseBoolean(envProvider.getenv(DIRECT_PATH_ENV_ENABLE_XDS));
if (isDirectPathXdsEnabled) {
// google-c2p resolver target must not have a port number
builder =
Grpc.newChannelBuilder("google-c2p-experimental:///" + serviceAddress, channelCreds);
// google-c2p: CloudToProd(C2P) Directpath. This scheme is defined in
// io.grpc.googleapis.GoogleCloudToProdNameResolverProvider.
// This resolver target must not have a port number.
builder = Grpc.newChannelBuilder("google-c2p:///" + serviceAddress, channelCreds);
} else {
builder = Grpc.newChannelBuilderForAddress(serviceAddress, port, channelCreds);
builder.defaultServiceConfig(directPathServiceConfig);
Expand Down