diff --git a/etcd/Client.hpp b/etcd/Client.hpp index c7e6754..72552a3 100644 --- a/etcd/Client.hpp +++ b/etcd/Client.hpp @@ -135,8 +135,6 @@ namespace etcd protected: - pplx::task send_get_request(web::http::uri_builder & uri); - pplx::task send_del_request(web::http::uri_builder & uri); pplx::task send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value); web::http::client::http_client client; diff --git a/src/Client.cpp b/src/Client.cpp index 4a80b91..7f31e05 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -34,16 +34,6 @@ etcd::Client::Client(std::string const & address) watchServiceStub= Watch::NewStub(channel); } -pplx::task etcd::Client::send_get_request(web::http::uri_builder & uri) -{ - return Response::create(client.request(web::http::methods::GET, uri.to_string())); -} - -pplx::task etcd::Client::send_del_request(web::http::uri_builder & uri) -{ - return Response::create(client.request(web::http::methods::DEL, uri.to_string())); -} - pplx::task etcd::Client::send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value) { std::string data = key + "=" + value; diff --git a/v3/include/Transaction.hpp b/v3/include/Transaction.hpp index 6c394e3..3c3cb14 100644 --- a/v3/include/Transaction.hpp +++ b/v3/include/Transaction.hpp @@ -1,10 +1,3 @@ -/* - * Transaction.hpp - * - * Created on: Jun 21, 2016 - * Author: ubuntu - */ - #ifndef V3_SRC_TRANSACTION_HPP_ #define V3_SRC_TRANSACTION_HPP_ @@ -38,6 +31,6 @@ private: std::string key; }; -} /* namespace etcdv3 */ +} -#endif /* V3_SRC_TRANSACTION_HPP_ */ +#endif diff --git a/v3/src/Transaction.cpp b/v3/src/Transaction.cpp index 1bed942..09919c6 100644 --- a/v3/src/Transaction.cpp +++ b/v3/src/Transaction.cpp @@ -1,10 +1,3 @@ -/* - * Transaction.cpp - * - * Created on: Jun 21, 2016 - * Author: ubuntu - */ - #include "v3/include/Transaction.hpp" using etcdserverpb::Compare; @@ -50,10 +43,10 @@ void etcdv3::Transaction::init_compare(int old_index, Compare::CompareResult res * get key on failure */ void etcdv3::Transaction::setup_basic_failure_operation(std::string const& key) { - std::unique_ptr get_request(new RangeRequest()); //then this can be just a raw pointer + std::unique_ptr get_request(new RangeRequest()); get_request->set_key(key); RequestOp* req_failure = txn_request.add_failure(); - req_failure->set_allocated_request_range(get_request.release()); //why not get()? + req_failure->set_allocated_request_range(get_request.release()); } /**