Commit Graph

14 Commits

Author SHA1 Message Date
Tao He 7c9b9e5699 Enable grpc timeout support in keepalive's refresh.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-24 00:20:55 +08:00
Tao He e5f1167c69 Implements the timeout feature to the etcd client.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-22 22:57:38 +08:00
Tao He 8da8946409 Refactor the implementation of sync-client and async-client.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-22 21:42:06 +08:00
Tao He 345380a83a
Allow specifying the auth token TTL when auth with password. (#109)
* Allow specifying the auth token TTL when auth with password.
* Fixes.

Resolves #107.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-12-22 14:30:45 +08:00
Tao He 68c5626d2c Keepalive: join the thread outside the background job itself.
Fixes #67, when etcd server stops, the keepalive action will crash.


Signed-off-by: Tao He <sighingnow@gmail.com>
2021-06-15 12:03:35 +08:00
Tao He 9e77fdb2ee
Fixes lock, and the underlying keepalive implmentation. (#60)
* Fixes lock, and the underlying keepalive implmentation.

The previous implementation is buggy when a lot of locks happen at the same time,
as the cpprestsdk's threadpool use a fixed number of thread for posix platform:

https://github.com/microsoft/cpprestsdk/blob/master/Release/src/pplx/threadpool.cpp#L198

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-21 18:05:35 +08:00
Nils Carlson ad2da0ac7e
Change KeepAlive lease expiry to throw std::out_of_range (#55)
Update documentation to show different exceptions used by KeepAlive as well.
2021-04-08 10:18:26 +08:00
Tao He 3e30c4c61d
Optimize the implementation of error handling in keep alive. (#54)
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-07 23:20:33 +08:00
Tao He 62a846d798
Handling (or checking) possible failure in lease's KeepAlive. (#53)
* Handling (or checking) possible failure in lease's KeepAlive.
* Add documentation.
* Enhance documentations.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-02 17:15:27 +08:00
Tao He d2e35ceb47
Reduce the dependency interface to avoid include all generated protobuf/grpc files. (#41)
Add CMake config files to make it looks as a cmake module.

Fixes https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/issues/37.

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-06 17:16:58 +08:00
Tao He 3bac086428 Fixes a unused warning.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-03 01:26:27 +08:00
Tao He 692840cb58 Support ubuntu 18.04 (boost-1.65), and test it in CI. 2021-01-30 14:43:16 +08:00
Tao He cfb5cb89d3 Fixes the -Werror for unused "continue_next": we just use it.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-01-11 20:47:11 +08:00
Tao He 6962030db8 Implements "KeepAlive" feature, and enhance "lock" with a lease.
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-01-10 23:39:50 +08:00