]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/thrift-gen/Collector_server.skeleton.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / exporters / jaeger / thrift-gen / Collector_server.skeleton.cpp
1 // This autogenerated skeleton file illustrates how to build a server.
2 // You should copy it to another filename to avoid overwriting it.
3
4 #include "Collector.h"
5 #include <thrift/protocol/TBinaryProtocol.h>
6 #include <thrift/server/TSimpleServer.h>
7 #include <thrift/transport/TServerSocket.h>
8 #include <thrift/transport/TBufferTransports.h>
9
10 using namespace ::apache::thrift;
11 using namespace ::apache::thrift::protocol;
12 using namespace ::apache::thrift::transport;
13 using namespace ::apache::thrift::server;
14
15 using namespace ::jaegertracing::thrift;
16
17 class CollectorHandler : virtual public CollectorIf {
18 public:
19 CollectorHandler() {
20 // Your initialization goes here
21 }
22
23 void submitBatches(std::vector<BatchSubmitResponse> & _return, const std::vector<Batch> & batches) {
24 // Your implementation goes here
25 printf("submitBatches\n");
26 }
27
28 };
29
30 int main(int argc, char **argv) {
31 int port = 9090;
32 ::std::shared_ptr<CollectorHandler> handler(new CollectorHandler());
33 ::std::shared_ptr<TProcessor> processor(new CollectorProcessor(handler));
34 ::std::shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
35 ::std::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
36 ::std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
37
38 TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
39 server.serve();
40 return 0;
41 }
42