Commit Graph

43 Commits

Author SHA1 Message Date
Andy Lok 1178d79ed6
implement the complete keyspace feature (#439)
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2023-12-27 18:12:40 +08:00
Xuanwo 2761270f6d
build: Make sure tikv-client works on stable rust (#412)
Signed-off-by: Xuanwo <github@xuanwo.io>
2023-07-16 23:51:11 +08:00
Andy Lok e49bc09496
Combine workspace into a unicrate (#402)
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2023-07-10 10:59:30 +08:00
Andy Lok 797960edfb
Improve rustfmt config (#401)
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2023-07-09 17:07:13 +08:00
Andy Lok 0a1de19450
Migrate to tonic (#399)
* Fix publish issue

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* migrate to tonic

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* fix

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* fix

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

* address comment

Signed-off-by: Andy Lok <andylokandy@hotmail.com>

---------

Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2023-07-08 16:27:11 +08:00
Ping Yu d2f78b2768
ci: Fix CI errors (#381)
Signed-off-by: Ping Yu <yuping@pingcap.com>
2022-12-14 10:21:58 +08:00
ekexium fcda3d0954
impl Clone for Client (#349)
* impl Clone for Client

Signed-off-by: ekexium <ekexium@gmail.com>

* fix clippy

Signed-off-by: ekexium <ekexium@gmail.com>

* Empty-Commit

Signed-off-by: ekexium <ekexium@fastmail.com>

* cache in github jobs

Signed-off-by: ekexium <ekexium@fastmail.com>
2022-06-15 19:05:44 +08:00
Shashwat Jaiswal 4404c7e1f0
migrate to slog (#298)
* migrate to slog

Signed-off-by: Shashwat Jaiswal <shashwatjaiswal2001@gmail.com>

* added optional logger while creating client

Signed-off-by: Shashwat Jaiswal <shashwatjaiswal2001@gmail.com>

* simplified unwrap expression

Signed-off-by: Shashwat Jaiswal <shashwatjaiswal2001@gmail.com>

* fixed rustfmt

Signed-off-by: Shashwat Jaiswal <shashwatjaiswal2001@gmail.com>
2021-07-08 12:11:21 +08:00
ekexium 578be6cff2 refactor: fix nightly cargo clippy
Signed-off-by: ekexium <ekexium@gmail.com>
2021-01-11 16:40:38 +08:00
Andy Lok d8887b054e apply clippy
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-12-15 18:22:39 +08:00
Andy Lok 9cb904a499 split scan() into scan() and scan_keys()
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-24 17:45:11 +08:00
Andy Lok 1857ed2f83 Resturcture take2
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-23 21:48:41 +08:00
Andy Lok 21a8dc43ad Merge from master
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
2020-11-20 20:53:11 +08:00
ekexium 3f8c3a7200 fix a bug in examples/raw
Signed-off-by: ekexium <ekexium@gmail.com>
2020-09-28 11:19:36 +08:00
ekexium 1868118ea6 set Value type to an alias of Vec<u8>
Signed-off-by: ekexium <ekexium@gmail.com>
2020-07-08 15:54:23 +08:00
you06 b7ced1f44e
raw: Implement `RawBatchScan` (#134)
Signed-off-by: you06 <you1474600@gmail.com>
2020-05-25 11:52:58 +08:00
Renkai 570ebc3f41 polish code
Signed-off-by: Renkai <gaelookair@gmail.com>
2020-05-20 16:43:07 +08:00
Renkai 25007df435 fix compile error
Signed-off-by: Renkai <gaelookair@gmail.com>
2020-04-07 16:58:23 +08:00
Yilin Chen 91aaedff2b
update dependencies and fix ci
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2020-03-19 12:17:46 +08:00
Yilin Chen f093c64f21
Upgrade toolchain and dependencies.
CI errors should be fixed and feature gates are removed.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2019-08-26 11:45:04 +08:00
Nick Cameron 8165adf1f9 Refactor into a request-style API (#87)
* Refactor the raw API to be command-oriented

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* WIP: provide mocks and use them for tests

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-08-09 07:53:55 -07:00
Nick Cameron 0ed7c8afe3 Introduce ToOwnedRange to make handling ranges a bit nicer
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 14:59:45 +12:00
Nick Cameron 426d596709 Remove From impls for Key and Value
Closes #61

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 14:40:42 +12:00
Nick Cameron f1e8b34f5a Address type-length limit in raw example
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron cfa5f8e34d Replace a Loop closure with a Stream in rpc/client
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron 4ad75c5bc7 Refactor RequestState etc to not need existential types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron 98108bf1fe Rename Client::new to connect (#64)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-04 15:55:41 -07:00
Nick Cameron bb044e6a83 Use .await syntax
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-05-30 10:20:03 +12:00
Nick Cameron 6353dbcfe3 Migrate to futures 0.3
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-05-30 10:20:03 +12:00
Nick Cameron 8defd7769b Bring license headers inline with TiKV
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-05-10 13:48:44 +12:00
Ana Hobden d6498832a9 Merge branch 'master' into dont-clone-config 2019-02-25 11:59:56 -08:00
Ana Hobden 72f4a176a4
Refine CI (#22)
* Refine CI

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Debug

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* debug

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Update windows path

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Correct switchdaemon

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Nocapture

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Merge before and script

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Try removing the travis cargo build cache

Signed-off-by: Brian Anderson <andersrb@gmail.com>
Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Install protoc

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Add some dependencies

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Try to get windows to detect environment properly

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Sudo is disabled on linux

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Add updated ubuntu package

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Note why windows is disabled

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Correct pkg name

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Add mac dependencies

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Resolve lint

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Allow unused code in select places

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* fmt

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Use raft 0.5.0 branch

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Remove AppVeyor, don't need it.

Signed-off-by: Ana Hobden <operator@hoverbear.org>
2019-02-25 11:50:57 -08:00
Ana Hobden 45b48cc244
Merge branch 'master' into dont-clone-config 2019-02-25 08:32:23 -08:00
Ana Hobden 593fe483f8 Don't copy Config internally. Take the value.
Signed-off-by: Ana Hobden <operator@hoverbear.org>
2019-02-21 11:37:58 -08:00
Yilin Chen 4e9a42fdf8 Use failure for error management (#23)
* Use failure for error management.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Add error constructors

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Remove NoSuchKey error

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2019-02-19 10:29:57 -08:00
Clément Renault 3c3d7f8df3
Improve the raw example
Signed-off-by: Clément Renault <renault.cle@gmail.com>
2019-01-21 17:35:14 +01:00
Xiaoguang Sun c47b92bab4 Change raw::Client::get to return Option<Value> (#24)
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
2019-01-20 21:49:50 -08:00
Yilin Chen c33bc136b4 Use command line args in examples. (#20)
* Initial version of Raw Kv client

Note: raw::Client::batch_scan is not implemented yet.

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Document most public code.

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Reduce pub surface

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* fmt/lint

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Add cf to concrete builder types

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Fixed some comments and confusing name

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change Request from struct to enum

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change tso_tx/rx channel to bounded

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Fix format issues and improve implementations

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change to dyn trait syntax

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* inline some functions

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Better note on KvPair

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Use 3 PDs in raw example

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Clarify documentation

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Get CI green

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Remove not useful PrivateKey type

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change CUSTOM_CF to "default" in examples/raw.rs

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Use command line args in examples.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Fix the wrong app name in the transactional API example.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

* Extract duplicate code to a common mod

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
2019-01-14 09:51:53 -08:00
Xiaoguang Sun 23cb2ef306 Remove cf and batch_scan from examples/raw.rs
Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
2019-01-14 08:38:35 +08:00
Xiaoguang Sun ba8675409d The initial version of Raw KV implementation (#14)
* Initial version of Raw Kv client

Note: raw::Client::batch_scan is not implemented yet.

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Document most public code.

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Reduce pub surface

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* fmt/lint

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Add cf to concrete builder types

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Fixed some comments and confusing name

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change Request from struct to enum

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change tso_tx/rx channel to bounded

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Fix format issues and improve implementations

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change to dyn trait syntax

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* inline some functions

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Better note on KvPair

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Use 3 PDs in raw example

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Clarify documentation

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Get CI green

Signed-off-by: Ana Hobden <operator@hoverbear.org>

* Remove not useful PrivateKey type

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>

* Change CUSTOM_CF to "default" in examples/raw.rs

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
2019-01-13 14:03:21 -08:00
A. Hobden 5ed332709e
Upgrade to 2018 Edition (#7)
* Bump to 2018 edition.

Signed-off-by: Hoverbear <operator@hoverbear.org>

* Add toolchain

Signed-off-by: Hoverbear <operator@hoverbear.org>

* Fix examples

Signed-off-by: Hoverbear <operator@hoverbear.org>

* fmt and lint

Signed-off-by: Hoverbear <operator@hoverbear.org>

* We can use stable now

Signed-off-by: Hoverbear <operator@hoverbear.org>
2018-12-23 07:28:02 -08:00
A. Hobden 0785626abc
Add copyright (#8)
Signed-off-by: Hoverbear <operator@hoverbear.org>
2018-11-20 08:10:26 -05:00
Xiaoguang Sun ddfad81d61 Public API Request for Comments (#3)
Implement draft of https://github.com/tikv/rfcs/pull/7 as of 80457b2df1c03cbca7cb32afec95e3c20a99b8d2.
2018-11-19 09:33:22 -05:00