Helper function for regional endpoints
We need a helper function (for a future PR), something like:
namespace google::cloud::dataproc {
gc::Options WithRegionalEndpoint(Options options, std::string const& region);
}
Originally posted by @coryan in https://github.com/googleapis/google-cloud-cpp/pull/8231#discussion_r799474901
Could this make use of the new generator support for ServiceConfiguration.EndpointLocationStyle?
Could this make use of the new generator support for
ServiceConfiguration.EndpointLocationStyle?
Probably. How would the code for this dataproc/quickstart would look like?
Could this make use of the new generator support for
ServiceConfiguration.EndpointLocationStyle?Probably. How would the code for this
dataproc/quickstartwould look like?
I guess the strawman would be something like ...
auto client = dataproc::ClusterControllerClient(
dataproc::MakeClusterControllerConnection(
region == "global" ? "" : region, options));
Alternatively, if we just used region == "" to mean the global endpoint, it could just be ...
auto client = dataproc::ClusterControllerClient(
dataproc::MakeClusterControllerConnection(region, options));
I think the first option is more explicit and we should go with it.