gorealis v2 refactor (#5)

* Changing default timeout for start maintenance.

* Upgrading dependencies to gorealis v2 and thrift  0.12.0

* Refactored to update to gorealis v2.
This commit is contained in:
Renan DelValle 2018-12-27 11:31:51 -08:00 committed by GitHub
parent ad4dd9606e
commit 6ab5c9334d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1335 changed files with 137431 additions and 61530 deletions

View file

@ -20,13 +20,10 @@
#ifndef _THRIFT_TEST_GENERICHELPERS_H_
#define _THRIFT_TEST_GENERICHELPERS_H_ 1
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/protocol/TProtocol.h>
#include <thrift/stdcxx.h>
#include <thrift/Thrift.h>
using boost::shared_ptr;
using namespace apache::thrift::protocol;
/* ClassName Helper for cleaner exceptions */
class ClassNames {
public:
@ -66,43 +63,43 @@ class GenericIO {
public:
/* Write functions */
static uint32_t write(shared_ptr<TProtocol> proto, const int8_t& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const int8_t& val) {
return proto->writeByte(val);
}
static uint32_t write(shared_ptr<TProtocol> proto, const int16_t& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const int16_t& val) {
return proto->writeI16(val);
}
static uint32_t write(shared_ptr<TProtocol> proto, const int32_t& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const int32_t& val) {
return proto->writeI32(val);
}
static uint32_t write(shared_ptr<TProtocol> proto, const double& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const double& val) {
return proto->writeDouble(val);
}
static uint32_t write(shared_ptr<TProtocol> proto, const int64_t& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const int64_t& val) {
return proto->writeI64(val);
}
static uint32_t write(shared_ptr<TProtocol> proto, const std::string& val) {
static uint32_t write(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, const std::string& val) {
return proto->writeString(val);
}
/* Read functions */
static uint32_t read(shared_ptr<TProtocol> proto, int8_t& val) { return proto->readByte(val); }
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, int8_t& val) { return proto->readByte(val); }
static uint32_t read(shared_ptr<TProtocol> proto, int16_t& val) { return proto->readI16(val); }
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, int16_t& val) { return proto->readI16(val); }
static uint32_t read(shared_ptr<TProtocol> proto, int32_t& val) { return proto->readI32(val); }
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, int32_t& val) { return proto->readI32(val); }
static uint32_t read(shared_ptr<TProtocol> proto, int64_t& val) { return proto->readI64(val); }
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, int64_t& val) { return proto->readI64(val); }
static uint32_t read(shared_ptr<TProtocol> proto, double& val) { return proto->readDouble(val); }
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, double& val) { return proto->readDouble(val); }
static uint32_t read(shared_ptr<TProtocol> proto, std::string& val) {
static uint32_t read(apache::thrift::stdcxx::shared_ptr<apache::thrift::protocol::TProtocol> proto, std::string& val) {
return proto->readString(val);
}
};