Skip to content

Commit

Permalink
added more comments
Browse files Browse the repository at this point in the history
Signed-off-by: hillium <[email protected]>
  • Loading branch information
YuJuncen committed Nov 21, 2023
1 parent 2a9acf3 commit d6c4847
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 14 deletions.
40 changes: 26 additions & 14 deletions pkg/brpb/brpb.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions proto/brpb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,32 @@ enum PrepareSnapshotBackupRequestType {
}

message PrepareSnapshotBackupRequest {
// The type of the request.
PrepareSnapshotBackupRequestType ty = 1;
// The regions related to the request.
// If the request is "UpdateLease" or "Finish", it should be empty.
repeated metapb.Region regions = 2;
// The lease duration for "UpdateLease" request.
uint64 lease_in_seconds = 3;
}

enum PrepareSnapshotBackupEventType {
// A region has finished wait apply.
WaitApplyDone = 0;
// A lease has been updated.
UpdateLeaseResult = 1;
}

message PrepareSnapshotBackupResponse {
// The type of the event.
PrepareSnapshotBackupEventType ty = 1;
// The region bind to the type.
// For "WaitApplyDone".
metapb.Region region = 2;
// The error of the execution.
errorpb.Error error = 3;
// Whether the last lease is valid.
// For "UpdateLease" and "Finish".
bool last_lease_is_valid = 4;
}

Expand Down

0 comments on commit d6c4847

Please sign in to comment.