Skip to content

Commit

Permalink
alts: add ComputeEngineChannelBuilder to interop test (#5475)
Browse files Browse the repository at this point in the history
* alts: add ComputeEngineChannelBuilder to interop test

* alts: rename to compute_engine_channel_creds
  • Loading branch information
Jiangtao Li authored Mar 14, 2019
1 parent 283f049 commit 185cf3d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.common.io.Files;
import io.grpc.ManagedChannel;
import io.grpc.alts.AltsChannelBuilder;
import io.grpc.alts.ComputeEngineChannelBuilder;
import io.grpc.alts.GoogleDefaultChannelBuilder;
import io.grpc.internal.AbstractManagedChannelImplBuilder;
import io.grpc.internal.GrpcUtil;
Expand Down Expand Up @@ -373,6 +374,10 @@ protected ManagedChannel createChannel() {
&& customCredentialsType.equals("google_default_credentials")) {
return GoogleDefaultChannelBuilder.forAddress(serverHost, serverPort).build();
}
if (customCredentialsType != null
&& customCredentialsType.equals("compute_engine_channel_creds")) {
return ComputeEngineChannelBuilder.forAddress(serverHost, serverPort).build();
}
if (useAlts) {
return AltsChannelBuilder.forAddress(serverHost, serverPort).build();
}
Expand Down

0 comments on commit 185cf3d

Please sign in to comment.