]> git.proxmox.com Git - ceph.git/blob - 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
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 "Agent.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::agent::thrift;
16
17 class AgentHandler : virtual public AgentIf {
18 public:
19 AgentHandler() {
20 // Your initialization goes here
21 }
22
23 void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans) {
24 // Your implementation goes here
25 printf("emitZipkinBatch\n");
26 }
27
28 void emitBatch(const ::jaegertracing::thrift::Batch& batch) {
29 // Your implementation goes here
30 printf("emitBatch\n");
31 }
32
33 };
34
35 int main(int argc, char **argv) {
36 int port = 9090;
37 ::std::shared_ptr<AgentHandler> handler(new AgentHandler());
38 ::std::shared_ptr<TProcessor> processor(new AgentProcessor(handler));
39 ::std::shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
40 ::std::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
41 ::std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
42
43 TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
44 server.serve();
45 return 0;
46 }
47