Commit Graph

258 Commits

Author SHA1 Message Date
Tao He 3186317579 Reliable macro condition to adapt to different version of gRPC.
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-01-31 12:30:13 +08:00
Tao He 19186bb235 Revert "Remove check and useless compatibility for older gRPC."
This reverts commit f1cc2f0459.
2023-01-31 11:47:07 +08:00
Tao He f1cc2f0459 Remove check and useless compatibility for older gRPC.
Signed-off-by: Tao He <sighingnow@gmail.com>
2023-01-31 11:35:43 +08:00
Tao He fe80439c5b Bump up to version 0.2.10 2023-01-10 15:23:07 +08:00
Tao He 10f3435c28
Enable keys() to list elements without fetching values from server (#184)
* Enable keys() to list elements without fetching values from server
* Add concurrency control and cancel to CI workflows

Signed-off-by: Tao He <sighingnow@gmail.com>
2023-01-10 15:00:34 +08:00
Tao He 47a5f5238f Bump up the version to v0.2.9.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-24 14:54:45 +08:00
Tao He 30c880dd05 Document the `client.observe()` API.
Resolves #148.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-24 14:53:10 +08:00
Tao He 2f15c45d4e
Protect the timer to avoid "cancel" and "refresh" happens at the same time. (#179)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-24 10:29:38 +08:00
Tao He c7f17cdf0d Fixes the descirption in the docs, and revisit the order of test cases.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-18 09:21:06 +08:00
Tao He 1e72df7ca3 Add test cases and documentation to show that binary data as key/value works well.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-18 00:52:01 +08:00
Tao He 9f09066b47
Fixes the timeout parameter and some improvements to find non-standard installed deps. (#178)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-17 13:18:36 +08:00
Tao He 62884c7e38 Avoid conflict with parent projects
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-14 21:13:10 +08:00
CayOest f6af474c5a
Replace CONTROL by vcpkg.json (#176) 2022-10-13 09:14:17 +08:00
Tao He 1fb5abac28
Implements the "etcdctl lease list" functionality (#174)
* Implements the "etcdctl lease list" functionalities.
* LeaseLeases requires etcd >= 3.3

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-13 00:04:18 +08:00
Tao He 71b5b3a1a3 Update the vcpkg configuration to the latest release.
Resolves #171.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-10 23:33:52 +08:00
Tao He bbcab86eab Fixes the format of comment lines
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-10 23:31:39 +08:00
Tao He ab255467d0
Taking error code from grpc. (#172)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-10-09 10:25:50 +08:00
Tao He 2e38d3c11e Bump up the library version to v0.2.8.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-30 14:49:45 +08:00
Tao He c81f3fb211
Watcher: add constructors to accept the wait callback. (#169)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-29 15:18:15 +08:00
Tao He 1108d986a7
Add transaction tests and documentations (#164)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-27 11:31:06 +08:00
Tao He 92efa7c9de Refine the README for openssl, API references, and how to unlock.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-24 11:38:17 +08:00
Tao He 39be27e021
Add a sync variant of lock on async client. (#163)
Resolves #139.

Lock is special, as it may cause the thread resources (in the pplx
thread pool) to be exhausted.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-20 21:20:58 +08:00
Tao He ed7ab08ef7 Limit C++ flags to this library itself.
Resolves #159.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-09-20 20:11:10 +08:00
zhanghan-mq a789dc2f13
build: as submodule, cancel `add_test()` (#160)
if we use `etcd-cpp-apiv3` as submodule, we don't need to test `etcd-cpp-apiv3`.
in `CMakeLists.txt`
```
enable_testing()
add_subdirectory(src)
add_subdirectory(tst)
```
this code force to set `add_test()` and maybe make the project failed to `unit tests`.

Signed-off-by: zhang.han <dalezh@163.com>

Signed-off-by: zhang.han <dalezh@163.com>
Co-authored-by: zhang.han <zhang.han@xsky.com>
2022-09-06 09:55:02 +08:00
wangbinzjut 69a1bf3b30
Update README.md (#155)
Co-authored-by: wangbin13 <wangbin13@corp.netease.com>
2022-08-18 15:39:33 +08:00
Tao He 543a901ee7 Bump up version to v0.2.7.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-08-17 11:37:32 +08:00
Tao He 89ae8a5ee4 Define "NOMINMAX" to ensure `<limits>` works.
See also: https://stackoverflow.com/questions/2561368/illegal-token-on-right-side-of

Resolves #149.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-08-17 11:34:28 +08:00
Tao He bd42e7129e Use `make -j$(nproc)` rather than plain `make -j`.
Addresses issues in #152.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-08-17 11:22:17 +08:00
Tao He ca2553e30d
Enable C++11 when testing grpc features. (#146)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-07-31 16:58:53 +08:00
Tao He efa502831d
Reject lower version of gRPC. (#145)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-07-31 15:21:38 +08:00
Tao He 2ed6cacce9
Add more variants for etcd::Watcher's constructor. (#144)
* Add more variants for etcd::Watcher's constructor.
* Use ASAN for testing on CI.
* Revert "Use ASAN for testing on CI."

This reverts commit 6ccc2161da.
2022-07-19 20:42:44 +08:00
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 2437a08e72 No timeout for leaserevoke.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-05-23 15:13:47 +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 f21c45b362 Bump up the version to v0.2.6 for a quickfix of the ctor
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-25 23:40:33 +08:00
Tao He 9a5267286b Use a explicit copy constructor as we noticed stack-buffer-overflow inside the copy ctor when ASAN is enabled
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-24 10:30:10 +08:00
Tao He ffb489ba4b Bump up the version number to v0.2.5
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-21 18:53:39 +08:00
Tao He bd4ec37ff4 Use int64_t for etcd revisions/indexes.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-21 18:52:34 +08:00
Tao He 9a2b753e9e Bump up version to v0.2.4.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-08 21:26:55 +08:00
Tao He 680e8ad5c6 Replace Tabs in sources and README with spaces.
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-08 20:49:56 +08:00
Tao He 56c7189f92 Revisit the watcher's reconnect functionality.
Address #73, #76, #117 and #118.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-08 19:55:31 +08:00
Tao He f70255c8b0 Revert "Add support to re-activate watcher from wait_callback in watcher async wait."
This reverts commit 0467c0eef3.
2022-04-08 19:55:31 +08:00
Tao He 9a2afd4e81 Revert "Update Watcher re-connection sample."
This reverts commit 23394ab9bb.
2022-04-08 19:55:31 +08:00
Tao He d4975f84b3
Return complete meta information of HEAD. (#123)
* Return complete meta information of HEAD.
* Fixes the CI by revisiting the LD_LIBRARY_PATH.

Signed-off-by: Tao He <sighingnow@gmail.com>
2022-04-06 16:01:49 +08:00
Tao He 767f0b1c65
Test against centos latest. (#121)
Signed-off-by: Tao He <sighingnow@gmail.com>
2022-03-30 09:22:18 +08:00
David Pastor 23394ab9bb Update Watcher re-connection sample. 2022-03-29 19:39:04 +08:00
David Pastor 0467c0eef3 Add support to re-activate watcher from wait_callback in watcher async wait.
Returns wait result when cancelling watcher.
2022-03-29 19:39:04 +08:00
Siyuan Zhang 82f632de11
Bump cmake mininum required version to 3.3 (#114)
Signed-off-by: siyuan0322 <siyuan0322@gmail.com>
2022-01-05 19:41:07 +08:00
Tao He 1575c5b43a
Fixes warnings and -Werror errors on Mac with the latest grpc. (#112)
Signed-off-by: Tao He <sighingnow@gmail.com>
2021-12-28 13:28:56 +08:00