Override BlockingPublisher Default Universe Domain

 namespace pubsub = ::google::cloud::pubsub;
  []() {
    google::cloud::Options options;

    // AddUniverseDomainOption interrogates the UnifiedCredentialsOption, if
    // set, in the provided Options for the Universe Domain associated with the
    // credentials and adds it to the set of Options.
    // If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
    auto ud_options =
        google::cloud::AddUniverseDomainOption(std::move(options));

    if (!ud_options.ok()) throw std::move(ud_options).status();
    auto pub =
        pubsub::BlockingPublisher(pubsub::MakeBlockingPublisherConnection(
            "europe-central2", *ud_options));
  } 
Design a Mobile Site
View Site in Mobile | Classic
Share by: