diff --git a/examples/tips/client_main.cc b/examples/tips/client_main.cc index f4a3b09601e86ef24525247dddb6ad8e6f63ebcb..23cabd155480ea117adce20845de64c71b13b672 100644 --- a/examples/tips/client_main.cc +++ b/examples/tips/client_main.cc @@ -36,6 +36,7 @@ #include <google/gflags.h> #include <grpc++/channel_interface.h> #include <grpc++/create_channel.h> +#include <grpc++/credentials.h> #include <grpc++/status.h> #include "examples/tips/client.h" @@ -55,11 +56,15 @@ int main(int argc, char** argv) { snprintf(host_port, host_port_buf_size, "%s:%d", FLAGS_server_host.c_str(), FLAGS_server_port); + std::unique_ptr<grpc::Credentials> creds = + grpc::CredentialsFactory::ComputeEngineCredentials(); std::shared_ptr<grpc::ChannelInterface> channel( - grpc::CreateTestChannel(host_port, - FLAGS_server_host, - true, // enable SSL - true)); // use prod roots + grpc::CreateTestChannel( + host_port, + FLAGS_server_host, + true, // enable SSL + true, // use prod roots + creds)); grpc::examples::tips::Client client(channel); grpc::Status s = client.CreateTopic("test");