Commit Graph

78 Commits

Author SHA1 Message Date
Matthew Fioravante 2dfbd385be Make input revision params 64 bit 2021-10-26 22:21:37 -04:00
Matthew Fioravante 9a481bf40a make compact_revision 64 bit 2021-10-26 22:13:41 -04:00
Matthew Fioravante ae45152a1a Make Response::index() 64 bit 2021-10-26 21:58:38 -04:00
Tao He d29e05545d Implements the put action.
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-10-12 10:17:25 +08:00
Matthew Fioravante e9db91b335
Allow changing Transaction key (#93)
* Allow changing Transaction key
* Fixes the compilation errors.

Signed-off-by: Matthew Fioravante <fmatthew5876@gmail.com>
Co-authored-by: Tao He <sighingnow@gmail.com>
2021-10-08 11:12:35 +08:00
Tao He b99dc2024e
Include compact revision for cancelled watch response. (#91)
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-28 11:24:11 +08:00
Tao He a949dec288
Add an optional `target_name_override` to support multiple-endpoints with SSL. (#89)
Resolves #87.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-24 02:41:46 +08:00
Tao He cda80854eb
Implements "v3election.proto" APIs. (#84)
Resolves #81.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-16 00:46:21 +08:00
Tao He 116b49b784
Lint source code, improve the quality and readability. (#82)
* Lint the source first, prepare for implementing #81.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-09-15 14:59:55 +08:00
Tao He efcecb7731 Add a "head" method on the client the retrieve the latest revision.
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-06-16 17:10:32 +08:00
Tao He 230ebfd08b
Avoid duplicate const string tags. (#62)
On behalf of Asplund, Rickard, thanks!

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-28 23:22:32 +08:00
Tao He 4dda2db5a1 Compatible with older version of gRPC.
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-27 23:13:04 +08:00
Tao He e80709418b Avoid including protobuf & grpc headers in our interface files.
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-05-27 22:10:24 +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
Tao He b3ce183889
Expose the etcdv3::detail::string_plus_one method. (#56)
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-08 10:33:39 +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 27e6e2ac11
Watch on range by specifying `rang_end`. (#52)
Follow-up work on #51, and fixes #50.

Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-02 01:34:58 +08:00
Tao He 1b24751b9d
List/delete/watch on exact range. (#51)
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-04-01 14:50:50 +08:00
rockeet 9339b6dee4
class Value: remove unused code (#48) 2021-03-29 18:53:56 +08:00
Tao He c9f82b46d4 Allows specify a lease TTL for lock.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-08 11:07:23 +08:00
Tao He 03baacf9ea
Support secure transport and certificate-based authentication. (#42)
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-02-07 01:35:37 +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 692840cb58 Support ubuntu 18.04 (boost-1.65), and test it in CI. 2021-01-30 14:43:16 +08:00
Tao He e5c804416c Protect implicit keepalive maps using a lexical scoped lock.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2021-01-12 01:11:35 +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
Tao He dd1f106150 Make "CancelWatch()" thread-safe and happen only once, fixes the potential assert failure in gRPC routines.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-15 19:56:23 +08:00
Tao He 3305a19d15 Drop the Interceptor-based implementation to be compatible with ealier version of gRPC (pre-0.17.0).
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-10 20:17:32 +08:00
Tao He eb284103e0 Auto and watch functionalities on SyncClient.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-10 20:17:32 +08:00
Tao He 0fb4f2887d Implements etcd v3 authentication.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-10-10 20:17:32 +08:00
Tao He 100eae97e9 Improve the etcd watcher to detect error when the connection lost.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He 6eb725de0e Add "limit" support on "ls" command.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He 60ffe62b26 Update accumulated changes.
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
2020-09-30 00:32:00 +08:00
Tao He 72b215a513 Re-org v3 related files to make it a submodule. 2020-09-30 00:32:00 +08:00
Tao He 4e9d17c188 Update protobuf, implments lock, fixes watch and improves txn (#1) 2020-09-30 00:32:00 +08:00
Arches 0c52135bf8 Deleted junk files
Added #include <grpc/support/log.h> since this is where GPR_ASSERT is now defined.
2016-12-13 11:14:49 +01:00
Arches e37cb46922 First commit 2016-08-29 16:14:57 +02:00
arches 60383a502c Make mvccpb::KeyValue a member of etcdv3::keyValue instead of
inheriting from it.
2016-07-26 10:04:26 -04:00
arches 888946b589 Added new interface for leasegrant and leaseId in add, set, modify, modify_if 2016-07-13 07:56:43 -04:00
arches 3c52636028 Implemented TTL and Lease 2016-07-13 05:09:42 -04:00
arches 658eaf7190 Remove extra ";" 2016-07-11 09:07:02 -04:00
arches 1e046d87a0 Use Actionv2::ActionParameters to pass arguments to AsyncActions. 2016-07-06 12:11:27 -04:00
arches 7d64447e76 Updates for Watcher 2016-07-05 05:22:11 -04:00
arches 174ea401b8 Added SyncClient class 2016-07-04 06:54:07 -04:00
arches a43de811f4 Refactor part1 2016-06-24 12:20:31 -04:00
arches 029f46df86 Removed mkdir 2016-06-22 04:34:26 -04:00
lampayan 366f10506c cleanup
removed unused old methods send_get_request and send_del_request
removed unnecessary comments
2016-06-22 09:51:46 +02:00
lampayan 618995c080 Merge remote-tracking branch 'origin/other_dev' into other_dev
# Conflicts:
#	etcd/Client.hpp
#	src/Client.cpp
2016-06-21 15:59:46 +02:00
lampayan b086ee9d72 Refactored transaction initialization.
cleaned up and added comments for methods in transaction class
2016-06-21 15:52:19 +02:00
arches b9eb2633d1 Added watch functionality 2016-06-21 09:19:26 -04:00