]>
git.proxmox.com Git - ceph.git/blob - 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.
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::thrift
;
17 class CollectorHandler
: virtual public CollectorIf
{
20 // Your initialization goes here
23 void submitBatches(std::vector
<BatchSubmitResponse
> & _return
, const std::vector
<Batch
> & batches
) {
24 // Your implementation goes here
25 printf("submitBatches\n");
30 int main(int argc
, char **argv
) {
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());
38 TSimpleServer
server(processor
, serverTransport
, transportFactory
, protocolFactory
);