]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/Agent.h
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / Agent.h
CommitLineData
f67539c2
TL
1/**
2 * Autogenerated by Thrift Compiler (0.11.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7#ifndef Agent_H
8#define Agent_H
9
10#include <thrift/TDispatchProcessor.h>
11#include <thrift/async/TConcurrentClientSyncInfo.h>
12#include "agent_types.h"
13
14namespace jaegertracing { namespace agent { namespace thrift {
15
16#ifdef _MSC_VER
17 #pragma warning( push )
18 #pragma warning (disable : 4250 ) //inheriting methods via dominance
19#endif
20
21class AgentIf {
22 public:
23 virtual ~AgentIf() {}
24 virtual void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans) = 0;
25 virtual void emitBatch(const ::jaegertracing::thrift::Batch& batch) = 0;
26};
27
28class AgentIfFactory {
29 public:
30 typedef AgentIf Handler;
31
32 virtual ~AgentIfFactory() {}
33
34 virtual AgentIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
35 virtual void releaseHandler(AgentIf* /* handler */) = 0;
36};
37
38class AgentIfSingletonFactory : virtual public AgentIfFactory {
39 public:
40 AgentIfSingletonFactory(const ::std::shared_ptr<AgentIf>& iface) : iface_(iface) {}
41 virtual ~AgentIfSingletonFactory() {}
42
43 virtual AgentIf* getHandler(const ::apache::thrift::TConnectionInfo&) {
44 return iface_.get();
45 }
46 virtual void releaseHandler(AgentIf* /* handler */) {}
47
48 protected:
49 ::std::shared_ptr<AgentIf> iface_;
50};
51
52class AgentNull : virtual public AgentIf {
53 public:
54 virtual ~AgentNull() {}
55 void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & /* spans */) {
56 return;
57 }
58 void emitBatch(const ::jaegertracing::thrift::Batch& /* batch */) {
59 return;
60 }
61};
62
63typedef struct _Agent_emitZipkinBatch_args__isset {
64 _Agent_emitZipkinBatch_args__isset() : spans(false) {}
65 bool spans :1;
66} _Agent_emitZipkinBatch_args__isset;
67
68class Agent_emitZipkinBatch_args {
69 public:
70
71 Agent_emitZipkinBatch_args(const Agent_emitZipkinBatch_args&);
72 Agent_emitZipkinBatch_args& operator=(const Agent_emitZipkinBatch_args&);
73 Agent_emitZipkinBatch_args() {
74 }
75
76 virtual ~Agent_emitZipkinBatch_args() throw();
77 std::vector< ::twitter::zipkin::thrift::Span> spans;
78
79 _Agent_emitZipkinBatch_args__isset __isset;
80
81 void __set_spans(const std::vector< ::twitter::zipkin::thrift::Span> & val);
82
83 bool operator == (const Agent_emitZipkinBatch_args & rhs) const
84 {
85 if (!(spans == rhs.spans))
86 return false;
87 return true;
88 }
89 bool operator != (const Agent_emitZipkinBatch_args &rhs) const {
90 return !(*this == rhs);
91 }
92
93 bool operator < (const Agent_emitZipkinBatch_args & ) const;
94
95 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
96 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
97
98};
99
100
101class Agent_emitZipkinBatch_pargs {
102 public:
103
104
105 virtual ~Agent_emitZipkinBatch_pargs() throw();
106 const std::vector< ::twitter::zipkin::thrift::Span> * spans;
107
108 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
109
110};
111
112typedef struct _Agent_emitBatch_args__isset {
113 _Agent_emitBatch_args__isset() : batch(false) {}
114 bool batch :1;
115} _Agent_emitBatch_args__isset;
116
117class Agent_emitBatch_args {
118 public:
119
120 Agent_emitBatch_args(const Agent_emitBatch_args&);
121 Agent_emitBatch_args& operator=(const Agent_emitBatch_args&);
122 Agent_emitBatch_args() {
123 }
124
125 virtual ~Agent_emitBatch_args() throw();
126 ::jaegertracing::thrift::Batch batch;
127
128 _Agent_emitBatch_args__isset __isset;
129
130 void __set_batch(const ::jaegertracing::thrift::Batch& val);
131
132 bool operator == (const Agent_emitBatch_args & rhs) const
133 {
134 if (!(batch == rhs.batch))
135 return false;
136 return true;
137 }
138 bool operator != (const Agent_emitBatch_args &rhs) const {
139 return !(*this == rhs);
140 }
141
142 bool operator < (const Agent_emitBatch_args & ) const;
143
144 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
145 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
146
147};
148
149
150class Agent_emitBatch_pargs {
151 public:
152
153
154 virtual ~Agent_emitBatch_pargs() throw();
155 const ::jaegertracing::thrift::Batch* batch;
156
157 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
158
159};
160
161class AgentClient : virtual public AgentIf {
162 public:
163 AgentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
164 setProtocol(prot);
165 }
166 AgentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
167 setProtocol(iprot,oprot);
168 }
169 private:
170 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
171 setProtocol(prot,prot);
172 }
173 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
174 piprot_=iprot;
175 poprot_=oprot;
176 iprot_ = iprot.get();
177 oprot_ = oprot.get();
178 }
179 public:
180 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
181 return piprot_;
182 }
183 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
184 return poprot_;
185 }
186 void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans);
187 void send_emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans);
188 void emitBatch(const ::jaegertracing::thrift::Batch& batch);
189 void send_emitBatch(const ::jaegertracing::thrift::Batch& batch);
190 protected:
191 std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
192 std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
193 ::apache::thrift::protocol::TProtocol* iprot_;
194 ::apache::thrift::protocol::TProtocol* oprot_;
195};
196
197class AgentProcessor : public ::apache::thrift::TDispatchProcessor {
198 protected:
199 ::std::shared_ptr<AgentIf> iface_;
200 virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext);
201 private:
202 typedef void (AgentProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
203 typedef std::map<std::string, ProcessFunction> ProcessMap;
204 ProcessMap processMap_;
205 void process_emitZipkinBatch(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
206 void process_emitBatch(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
207 public:
208 AgentProcessor(::std::shared_ptr<AgentIf> iface) :
209 iface_(iface) {
210 processMap_["emitZipkinBatch"] = &AgentProcessor::process_emitZipkinBatch;
211 processMap_["emitBatch"] = &AgentProcessor::process_emitBatch;
212 }
213
214 virtual ~AgentProcessor() {}
215};
216
217class AgentProcessorFactory : public ::apache::thrift::TProcessorFactory {
218 public:
219 AgentProcessorFactory(const ::std::shared_ptr< AgentIfFactory >& handlerFactory) :
220 handlerFactory_(handlerFactory) {}
221
222 ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo);
223
224 protected:
225 ::std::shared_ptr< AgentIfFactory > handlerFactory_;
226};
227
228class AgentMultiface : virtual public AgentIf {
229 public:
230 AgentMultiface(std::vector<std::shared_ptr<AgentIf> >& ifaces) : ifaces_(ifaces) {
231 }
232 virtual ~AgentMultiface() {}
233 protected:
234 std::vector<std::shared_ptr<AgentIf> > ifaces_;
235 AgentMultiface() {}
236 void add(::std::shared_ptr<AgentIf> iface) {
237 ifaces_.push_back(iface);
238 }
239 public:
240 void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans) {
241 size_t sz = ifaces_.size();
242 size_t i = 0;
243 for (; i < (sz - 1); ++i) {
244 ifaces_[i]->emitZipkinBatch(spans);
245 }
246 ifaces_[i]->emitZipkinBatch(spans);
247 }
248
249 void emitBatch(const ::jaegertracing::thrift::Batch& batch) {
250 size_t sz = ifaces_.size();
251 size_t i = 0;
252 for (; i < (sz - 1); ++i) {
253 ifaces_[i]->emitBatch(batch);
254 }
255 ifaces_[i]->emitBatch(batch);
256 }
257
258};
259
260// The 'concurrent' client is a thread safe client that correctly handles
261// out of order responses. It is slower than the regular client, so should
262// only be used when you need to share a connection among multiple threads
263class AgentConcurrentClient : virtual public AgentIf {
264 public:
265 AgentConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
266 setProtocol(prot);
267 }
268 AgentConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
269 setProtocol(iprot,oprot);
270 }
271 private:
272 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
273 setProtocol(prot,prot);
274 }
275 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
276 piprot_=iprot;
277 poprot_=oprot;
278 iprot_ = iprot.get();
279 oprot_ = oprot.get();
280 }
281 public:
282 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
283 return piprot_;
284 }
285 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
286 return poprot_;
287 }
288 void emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans);
289 void send_emitZipkinBatch(const std::vector< ::twitter::zipkin::thrift::Span> & spans);
290 void emitBatch(const ::jaegertracing::thrift::Batch& batch);
291 void send_emitBatch(const ::jaegertracing::thrift::Batch& batch);
292 protected:
293 std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
294 std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
295 ::apache::thrift::protocol::TProtocol* iprot_;
296 ::apache::thrift::protocol::TProtocol* oprot_;
297 ::apache::thrift::async::TConcurrentClientSyncInfo sync_;
298};
299
300#ifdef _MSC_VER
301 #pragma warning( pop )
302#endif
303
304}}} // namespace
305
306#endif