etcdserverpb, v3rpc: add Snapshot to Maintenance RPC service

This commit is contained in:
Anthony Romano
2016-04-08 00:58:46 -07:00
parent af1b3f061a
commit a6b6fcf1c4
5 changed files with 487 additions and 71 deletions

View File

@ -85,6 +85,9 @@ service Maintenance {
// This is designed for testing; do not use this in production when there
// are ongoing transactions.
rpc Hash(HashRequest) returns (HashResponse) {}
// Snapshot sends a snapshot of the entire backend
rpc Snapshot(SnapshotRequest) returns (stream SnapshotResponse) {}
}
service Auth {
@ -311,6 +314,21 @@ message HashResponse {
uint32 hash = 2;
}
message SnapshotRequest {
}
message SnapshotResponse {
// header has the current store information. The first header in the snapshot
// stream indicates the point in time of the snapshot.
ResponseHeader header = 1;
// remaining_bytes is the number of blob bytes to be sent after this message
uint64 remaining_bytes = 2;
// blob has the next chunk of the snapshot in the snapshot stream.
bytes blob = 3;
}
message WatchRequest {
oneof request_union {
WatchCreateRequest create_request = 1;