-
Notifications
You must be signed in to change notification settings - Fork 134
/
Copy pathlogbackuppb.proto
58 lines (47 loc) · 1.58 KB
/
logbackuppb.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
syntax = "proto3";
package logbackup;
import "gogoproto/gogo.proto";
import "rustproto.proto";
import "errorpb.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";
// The minimal information for identify a region.
message RegionIdentity {
uint64 id = 1;
uint64 epoch_version = 2;
// We omitted epoch_conf_version because config change won't make range change.
}
// The last flush ts with region information.
message RegionCheckpoint {
errorpb.Error err = 1;
RegionIdentity region = 2;
uint64 checkpoint = 3;
}
message GetLastFlushTSOfRegionRequest {
repeated RegionIdentity regions = 1;
}
message GetLastFlushTSOfRegionResponse {
repeated RegionCheckpoint checkpoints = 1;
}
message SubscribeFlushEventRequest {
string client_id = 1;
}
message SubscribeFlushEventResponse {
repeated FlushEvent events = 1;
}
message FlushEvent {
bytes start_key = 1;
bytes end_key = 2;
uint64 checkpoint = 3;
}
// The log backup service.
// Generally, most essential interfaces of log backup (say, checkpoint management, task management) are
// provided by adding some key in the embed etcd of PD.
// This interface is mainly provided for the checkpoint advancer and debug usage.
service LogBackup {
rpc GetLastFlushTSOfRegion(GetLastFlushTSOfRegionRequest) returns (GetLastFlushTSOfRegionResponse) {}
rpc SubscribeFlushEvent(SubscribeFlushEventRequest) returns (stream SubscribeFlushEventResponse) {}
}