use grpc to replace http APIs for batch volume id lookup and batch delete

1. remove batch volume id lookup http API /vol/lookup
2. remove batch delete http API /delete
This commit is contained in:
Chris Lu
2018-10-14 00:12:28 -07:00
parent 3ddcd87098
commit ff66269b62
16 changed files with 423 additions and 237 deletions

View File

@@ -9,6 +9,8 @@ service Seaweed {
}
rpc KeepConnected (stream ClientListenRequest) returns (stream VolumeLocation) {
}
rpc LookupVolume (LookupVolumeRequest) returns (LookupVolumeResponse) {
}
}
//////////////////////////////////////////////////
@@ -69,3 +71,21 @@ message VolumeLocation {
repeated uint32 new_vids = 3;
repeated uint32 deleted_vids = 4;
}
message LookupVolumeRequest {
repeated string volume_ids = 1;
string collection = 2; // optional, a bit faster if provided.
}
message LookupVolumeResponse {
message VolumeIdLocation {
string volume_id = 1;
repeated Location locations = 2;
string error = 3;
}
repeated VolumeIdLocation volume_id_locations = 1;
}
message Location {
string url = 1;
string public_url = 2;
}