| 1 | // NOLINT(namespace-envoy) |
| 2 | #include <cstdlib> |
| 3 | #include <iostream> |
| 4 | |
| 5 | #include "google/protobuf/descriptor.h" |
| 6 | |
| 7 | // Basic C++ build/link validation for the v2 xDS APIs. |
| 8 | int main(int argc, char* argv[]) { |
| 9 | const char* methods[] = { |
| 10 | "xds.service.orca.v3.OpenRcaService.StreamCoreMetrics", |
| 11 | // Old name for backward compatibility. |
| 12 | // TODO(roth): Remove once all callers are updated to use the new name. |
| 13 | "udpa.service.orca.v1.OpenRcaService.StreamCoreMetrics", |
| 14 | }; |
| 15 | |
| 16 | for (const char* method : methods) { |
| 17 | if (google::protobuf::DescriptorPool::generated_pool()->FindMethodByName(method) == nullptr) { |
| 18 | std::cout << "Unable to find method descriptor for " << method << std::endl; |
| 19 | exit(EXIT_FAILURE); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | exit(EXIT_SUCCESS); |
| 24 | } |