]>
git.proxmox.com Git - ceph.git/blob - 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.
5 #include <thrift/protocol/TBinaryProtocol.h>
6 #include <thrift/server/TSimpleServer.h>
7 #include <thrift/transport/TServerSocket.h>
8 #include <thrift/transport/TBufferTransports.h>
10 using namespace ::apache::thrift
;
11 using namespace ::apache::thrift::protocol
;
12 using namespace ::apache::thrift::transport
;
13 using namespace ::apache::thrift::server
;
15 using namespace ::jaegertracing::agent::thrift
;
17 class AgentHandler
: virtual public AgentIf
{
20 // Your initialization goes here
23 void emitZipkinBatch(const std::vector
< ::twitter::zipkin::thrift::Span
> & spans
) {
24 // Your implementation goes here
25 printf("emitZipkinBatch\n");
28 void emitBatch(const ::jaegertracing::thrift::Batch
& batch
) {
29 // Your implementation goes here
30 printf("emitBatch\n");
35 int main(int argc
, char **argv
) {
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());
43 TSimpleServer
server(processor
, serverTransport
, transportFactory
, protocolFactory
);