Skip to content

Commit cf5eb8d

Browse files
committed
Add ttl for raw client
Signed-off-by: Andy Lok <andylokandy@hotmail.com>
1 parent 1178d79 commit cf5eb8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+11069
-367
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ prometheus = { version = "0.13", default-features = false }
3838
prost = "0.12"
3939
rand = "0.8"
4040
regex = "1"
41-
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
4241
semver = "1.0"
4342
serde = "1.0"
4443
serde_derive = "1.0"
@@ -54,6 +53,7 @@ env_logger = "0.10"
5453
fail = { version = "0.4", features = ["failpoints"] }
5554
proptest = "1"
5655
proptest-derive = "0.3"
56+
reqwest = { version = "0.11", features = ["json", "native-tls-vendored"] }
5757
rstest = "0.18.2"
5858
serde_json = "1"
5959
serial_test = "0.5.0"

proto-build/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ edition = "2021"
1212

1313
[dependencies]
1414
glob = "0.3"
15-
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }
15+
tonic-build = { version = "0.10", features = ["cleanup-markdown"] }

proto/autoid.proto

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
syntax = "proto3";
2+
package autoid;
3+
4+
import "gogoproto/gogo.proto";
5+
import "rustproto.proto";
6+
7+
option (gogoproto.sizer_all) = true;
8+
option (gogoproto.marshaler_all) = true;
9+
option (gogoproto.unmarshaler_all) = true;
10+
option (rustproto.lite_runtime_all) = true;
11+
12+
option java_package = "org.tikv.kvproto";
13+
14+
message AutoIDRequest {
15+
int64 dbID = 1;
16+
int64 tblID = 2;
17+
bool isUnsigned = 3;
18+
uint64 n = 4;
19+
int64 increment = 5;
20+
int64 offset = 6;
21+
uint32 keyspaceID = 7;
22+
}
23+
24+
message AutoIDResponse {
25+
int64 min = 1;
26+
int64 max = 2;
27+
28+
bytes errmsg = 3;
29+
}
30+
31+
message RebaseRequest {
32+
int64 dbID = 1;
33+
int64 tblID = 2;
34+
bool isUnsigned = 3;
35+
int64 base = 4;
36+
bool force = 5;
37+
}
38+
39+
message RebaseResponse {
40+
bytes errmsg = 1;
41+
}
42+
43+
service AutoIDAlloc {
44+
rpc AllocAutoID(AutoIDRequest) returns (AutoIDResponse) {}
45+
rpc Rebase(RebaseRequest) returns (RebaseResponse) {}
46+
}
47+

0 commit comments

Comments
 (0)