Moving from govendor to dep, updated dependencies (#48)
* Moving from govendor to dep. * Making the pull request template more friendly. * Fixing akward space in PR template. * goimports run on whole project using ` goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./gen-go/*")` source of command: https://gist.github.com/bgentry/fd1ffef7dbde01857f66
This commit is contained in:
parent
9631aa3aab
commit
8d445c1c77
2186 changed files with 400410 additions and 352 deletions
43
vendor/git.apache.org/thrift.git/contrib/zeromq/test-server.cpp
generated
vendored
Normal file
43
vendor/git.apache.org/thrift.git/contrib/zeromq/test-server.cpp
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include "zmq.hpp"
|
||||
#include "TZmqServer.h"
|
||||
#include "Storage.h"
|
||||
|
||||
using boost::shared_ptr;
|
||||
using apache::thrift::TProcessor;
|
||||
using apache::thrift::server::TZmqServer;
|
||||
using apache::thrift::server::TZmqMultiServer;
|
||||
|
||||
class StorageHandler : virtual public StorageIf {
|
||||
public:
|
||||
StorageHandler()
|
||||
: value_(0)
|
||||
{}
|
||||
|
||||
void incr(const int32_t amount) {
|
||||
value_ += amount;
|
||||
}
|
||||
|
||||
int32_t get() {
|
||||
return value_;
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t value_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
shared_ptr<StorageHandler> handler(new StorageHandler());
|
||||
shared_ptr<TProcessor> processor(new StorageProcessor(handler));
|
||||
|
||||
zmq::context_t ctx(1);
|
||||
TZmqServer reqrep_server(processor, ctx, "tcp://0.0.0.0:9090", ZMQ_REP);
|
||||
TZmqServer oneway_server(processor, ctx, "tcp://0.0.0.0:9091", ZMQ_UPSTREAM);
|
||||
TZmqMultiServer multiserver;
|
||||
multiserver.servers().push_back(&reqrep_server);
|
||||
multiserver.servers().push_back(&oneway_server);
|
||||
multiserver.serveForever();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue