cleanup
removed unused old methods send_get_request and send_del_request removed unnecessary comments
This commit is contained in:
parent
8ae3a250dd
commit
366f10506c
|
|
@ -135,8 +135,6 @@ namespace etcd
|
|||
|
||||
protected:
|
||||
|
||||
pplx::task<Response> send_get_request(web::http::uri_builder & uri);
|
||||
pplx::task<Response> send_del_request(web::http::uri_builder & uri);
|
||||
pplx::task<Response> send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value);
|
||||
|
||||
web::http::client::http_client client;
|
||||
|
|
|
|||
|
|
@ -34,16 +34,6 @@ etcd::Client::Client(std::string const & address)
|
|||
watchServiceStub= Watch::NewStub(channel);
|
||||
}
|
||||
|
||||
pplx::task<etcd::Response> 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::Response> 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::Response> etcd::Client::send_put_request(web::http::uri_builder & uri, std::string const & key, std::string const & value)
|
||||
{
|
||||
std::string data = key + "=" + value;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<RangeRequest> get_request(new RangeRequest()); //then this can be just a raw pointer
|
||||
std::unique_ptr<RangeRequest> 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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue