timeout data type changed to long.

This commit is contained in:
samur 2021-01-29 08:23:16 +03:00
parent 56081d05a9
commit 14d96780bf
6 changed files with 10 additions and 10 deletions

View File

@ -129,7 +129,7 @@ const bool authenticate(std::shared_ptr<grpc::Channel> const &channel,
}
etcd::Client::Client(std::string const & address,
const unsigned int& timeout,
const long& timeout,
std::string const & load_balancer)
{
// create channels
@ -152,7 +152,7 @@ etcd::Client::Client(std::string const & address,
etcd::Client::Client(std::string const & address,
std::string const & username,
std::string const & password,
const unsigned int& timeout,
const long& timeout,
std::string const & load_balancer)
{
// create channels

View File

@ -27,7 +27,7 @@ namespace etcd
* @param load_balancer is the load balance strategy, can be one of round_robin/pick_first/grpclb/xds.
*/
SyncClient(std::string const & etcd_url,
const unsigned int& timeout = std::numeric_limits<unsigned int>::max(),
const long& timeout = std::numeric_limits<long>::max(),
std::string const & load_balancer = "round_robin");
/**
@ -43,7 +43,7 @@ namespace etcd
SyncClient(std::string const & etcd_url,
std::string const & username,
std::string const & password,
const unsigned int& timeout = std::numeric_limits<unsigned int>::max(),
const long& timeout = std::numeric_limits<long>::max(),
std::string const & load_balancer = "round_robin");
Response get(std::string const & key);

View File

@ -42,7 +42,7 @@ namespace etcdv3
Watch::Stub* watch_stub;
Lease::Stub* lease_stub;
Lock::Stub* lock_stub;
unsigned int timeout;
long timeout;
};
class Action

View File

@ -129,7 +129,7 @@ const bool authenticate(std::shared_ptr<grpc::Channel> const &channel,
}
etcd::Client::Client(std::string const & address,
const unsigned int& timeout,
const long& timeout,
std::string const & load_balancer)
{
// create channels
@ -152,7 +152,7 @@ etcd::Client::Client(std::string const & address,
etcd::Client::Client(std::string const & address,
std::string const & username,
std::string const & password,
const unsigned int& timeout,
const long& timeout,
std::string const & load_balancer)
{
// create channels

View File

@ -10,7 +10,7 @@
return etcd::Response(500, ex.what()); \
}
etcd::SyncClient::SyncClient(std::string const & address, const unsigned int& timeout, std::string const & load_balancer)
etcd::SyncClient::SyncClient(std::string const & address, const long& timeout, std::string const & load_balancer)
: client(address, timeout, load_balancer)
{
}
@ -18,7 +18,7 @@ etcd::SyncClient::SyncClient(std::string const & address, const unsigned int& ti
etcd::SyncClient::SyncClient(std::string const & address,
std::string const & username,
std::string const & password,
const unsigned int& timeout,
const long& timeout,
std::string const & load_balancer)
: client(address, username, password, timeout, load_balancer)
{

View File

@ -23,7 +23,7 @@ etcdv3::ActionParameters::ActionParameters()
kv_stub = NULL;
watch_stub = NULL;
lease_stub = NULL;
timeout = std::numeric_limits<unsigned int>::max();
timeout = std::numeric_limits<long>::max();
}
void etcdv3::Action::waitForResponse()