Commit Graph

879 Commits

Author SHA1 Message Date
Nick Cameron e8b04a9715
Merge pull request #79 from nrc/ts
Some more refactoring
2019-07-12 14:39:33 +12:00
Nick Cameron 35fe306172 Fix the build
Needed to pin the compiler to work around a compiler bug which manifests in syn.

Changes to work with futures 3.0.17.

Use latest Prost from the Git repo so we get the same version as kvproto

Use lazy_static 1.0 to avoid deprecation warnings.

Satisfy Clippy on `Err(...)?`

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 14:09:18 +12:00
Nick Cameron e9c16deca9 trim some fat around the region types
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 10:38:05 +12:00
Nick Cameron 4dba98b9d3 Remove unused getter
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 10:38:05 +12:00
Nick Cameron 3e44759e39 Remove duplicate timestamp type
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-12 10:38:05 +12:00
Ana Hobden 1815a3bf54
Add proptest support (#68)
* Add proptest support

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

* fmt

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

* Make proptest feature more consistent

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

* Fixes #69

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

* fmt

Signed-off-by: Ana Hobden <operator@hoverbear.org>
2019-07-04 17:35:11 -07:00
Nick Cameron 75eae033a7 Remove toolchain special casing (#78)
Since various bugs are fixed upstream

Closes #55

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-07-02 12:18:48 -07:00
Nick Cameron 7bdaeae2a5
Merge pull request #77 from nrc/deref
Remove `Deref` impls for Keys and Values
2019-07-02 11:13:58 +12:00
Nick Cameron eaff4919e9 Remove Defer impls for Keys and Values
Closes #76

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-28 14:41:17 +12:00
Nick Cameron 2ea6ecc45b
Merge pull request #73 from nrc/box-futures
Refactor everything
2019-06-28 13:16:38 +12:00
Nick Cameron fb55c458c4 Restore Transaction::new example/docs
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-25 14:29:27 +12:00
Nick Cameron 5d6175a1c0 Address some CI issues
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 13:53:16 +12:00
Nick Cameron 21f4f13d99 Replace into_inner with Into impls
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron 6cdb012d48 Use derive(new) in a few more places
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron 26cf1daf69 Remove RpcClientInner
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +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 d77340374f Remove a helper method and move a private method
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron c147ac6ff1 Refactor ScanRegionsContext
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron d4789ddec9 Don't pass an arg in and out of kv_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 6416d5a0ed Avoid boxing futures
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron f9ddd4a564 Remove some glob imports
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-24 10:42:21 +12:00
Nick Cameron 56bddc2598
Merge pull request #72 from nrc/mods
Split raw and transaction into smaller modules
2019-06-21 16:25:21 +12:00
Nick Cameron b578f63bee Fixup privacy in raw::requests
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-21 15:58:47 +12:00
Nick Cameron 69aed7789d Split up the raw and transaction modules
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-21 15:37:53 +12:00
Nick Cameron 8ae2e197e6 Move raw and transaction files
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-21 15:24:37 +12:00
Nick Cameron 11b0e1bb82
Merge pull request #71 from nrc/key-range
Refactor KvRange
2019-06-21 15:22:53 +12:00
Nick Cameron 8e0127d6ba
Merge branch 'master' into key-range 2019-06-21 13:37:23 +12:00
Nick Cameron cd33d50815 Apply suggestions from code review
Co-Authored-By: Brian Anderson <andersrb@gmail.com>

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-21 13:34:39 +12:00
Brian Anderson cc19c91a98
Merge pull request #70 from nrc/refactor-2
Refactor the rpc client internals.
2019-06-20 15:40:48 -07:00
Nick Cameron 9b72d47dce Refactor KvRange
The end result is a concrete type `BoundRange` and using `Into<BoundRange>`
where functions previously took `KeyRange`. This refactoring means that errors
with invalid ranges are found earlier (in fact, they are mostly prevented statically,
where they can still occur, they do so when ranges are created, not when used)
and there is less conversion between range types in some cases. There is less
`Result` handling, and we use a named struct instead of a tuple for ranges
internally.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-20 11:31:30 +12:00
Nick Cameron 27ec73d750 Refactor the rpc clients.
There are no API changes here, the goal is just to simplify the code.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-19 22:30:08 +12:00
Nick Cameron aa3e1af271 Force local and Travis builds to use an old nightly (#67)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-18 16:34:28 -07:00
Nick Cameron 90f715f47c
Merge pull request #65 from nrc/futures-imports
Reorganise futures imports
2019-06-11 09:54:41 +12:00
Nick Cameron 18f538c008 Reorganise futures imports
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-05 11:04:34 +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 e6f22512c5
Merge pull request #57 from nrc/minor
Remove some code
2019-06-05 10:24:34 +12:00
Nick Cameron 8fbbfbf1cf
Merge branch 'master' into minor 2019-06-05 09:16:40 +12:00
Nick Cameron 80dbb5289d
Merge pull request #63 from nrc/col-family-2
Make `ColumnFamily` a little more opaque
2019-06-05 09:16:31 +12:00
Nick Cameron c5eb7d4b02 Make `ColumnFamily` a little more opaque
Derived from #58

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-05 08:54:07 +12:00
Nick Cameron 19a7a41678
Merge branch 'master' into minor 2019-06-05 08:19:20 +12:00
Nick Cameron 6615d3d4b9
Merge pull request #59 from nrc/rpc
refactor the rpc module
2019-06-05 08:19:11 +12:00
Nick Cameron e88880f568
Merge branch 'master' into rpc 2019-06-05 07:54:29 +12:00
Nick Cameron 2d370d2920
Merge branch 'master' into minor 2019-06-05 07:53:54 +12:00
Nick Cameron f2687e95a4
Merge pull request #62 from nrc/warn
Fix a warning
2019-06-05 07:53:32 +12:00
Nick Cameron 72a360507c Fix a warning
Caused by an incorrect conversion in #41

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-06-04 16:22:33 +12:00
Nick Cameron d221e026f1
Merge branch 'master' into rpc 2019-06-04 14:15:47 +12:00
Nick Cameron cc3002c924
Merge branch 'master' into minor 2019-06-04 14:14:16 +12:00
Nick Cameron 89b1242d6c
Merge pull request #52 from hello2dj/use-reg-trim-rpc-scheme
rpc: user regexp replace string match scheme
2019-05-31 22:00:56 +12:00