Skip to content

Commit

Permalink
implement ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Dec 17, 2023
1 parent c9f6cc5 commit bab9704
Show file tree
Hide file tree
Showing 66 changed files with 10,973 additions and 293 deletions.
47 changes: 47 additions & 0 deletions proto/autoid.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
syntax = "proto3";
package autoid;

import "gogoproto/gogo.proto";
import "rustproto.proto";

option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (rustproto.lite_runtime_all) = true;

option java_package = "org.tikv.kvproto";

message AutoIDRequest {
int64 dbID = 1;
int64 tblID = 2;
bool isUnsigned = 3;
uint64 n = 4;
int64 increment = 5;
int64 offset = 6;
uint32 keyspaceID = 7;
}

message AutoIDResponse {
int64 min = 1;
int64 max = 2;

bytes errmsg = 3;
}

message RebaseRequest {
int64 dbID = 1;
int64 tblID = 2;
bool isUnsigned = 3;
int64 base = 4;
bool force = 5;
}

message RebaseResponse {
bytes errmsg = 1;
}

service AutoIDAlloc {
rpc AllocAutoID(AutoIDRequest) returns (AutoIDResponse) {}
rpc Rebase(RebaseRequest) returns (RebaseResponse) {}
}

Loading

0 comments on commit bab9704

Please sign in to comment.