]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/thrift-gen/Agent_server.skeleton.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / exporters / jaeger / thrift-gen / Agent_server.skeleton.cpp
diff --git a/ceph/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/thrift-gen/Agent_server.skeleton.cpp b/ceph/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/thrift-gen/Agent_server.skeleton.cpp
new file mode 100644 (file)
index 0000000..60fdd94
--- /dev/null
@@ -0,0 +1,47 @@
+// This autogenerated skeleton file illustrates how to build a server.
+// You should copy it to another filename to avoid overwriting it.
+
+#include "Agent.h"
+#include <thrift/protocol/TBinaryProtocol.h>
+#include <thrift/server/TSimpleServer.h>
+#include <thrift/transport/TServerSocket.h>
+#include <thrift/transport/TBufferTransports.h>
+
+using namespace ::apache::thrift;
+using namespace ::apache::thrift::protocol;
+using namespace ::apache::thrift::transport;
+using namespace ::apache::thrift::server;
+
+using namespace  ::jaegertracing::agent::thrift;
+
+class AgentHandler : virtual public AgentIf {
+ public:
+  AgentHandler() {
+    // Your initialization goes here
+  }
+
+  void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans) {
+    // Your implementation goes here
+    printf("emitZipkinBatch\n");
+  }
+
+  void emitBatch(const  ::jaegertracing::thrift::Batch& batch) {
+    // Your implementation goes here
+    printf("emitBatch\n");
+  }
+
+};
+
+int main(int argc, char **argv) {
+  int port = 9090;
+  ::std::shared_ptr<AgentHandler> handler(new AgentHandler());
+  ::std::shared_ptr<TProcessor> processor(new AgentProcessor(handler));
+  ::std::shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
+  ::std::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+  ::std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+
+  TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+  server.serve();
+  return 0;
+}
+