make object.GetRange to be server-side streaming RPC

This commit is contained in:
Leonard Lyubich 2020-02-05 13:38:53 +03:00
parent 63b956e50c
commit 6bd0d99ddd
2 changed files with 8 additions and 8 deletions

View file

@ -42,9 +42,10 @@ service Service {
// package).
rpc Search(SearchRequest) returns (stream SearchResponse);
// GetRange of data payload. Ranges are set of pairs (offset, length).
// Fragments order in response corresponds to ranges order in request.
rpc GetRange(GetRangeRequest) returns (GetRangeResponse);
// GetRange of data payload. Range is a pair (offset, length).
// Requested range can be restored by concatenation of all chunks
// keeping receiving order.
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
// GetRangeHash returns homomorphic hash of object payload range after XOR
// operation. Ranges are set of pairs (offset, length). Hashes order in
@ -153,8 +154,8 @@ message SearchResponse {
message GetRangeRequest {
// Address of object (container id + object id)
refs.Address Address = 1 [(gogoproto.nullable) = false];
// Ranges of object's payload to return
repeated Range Ranges = 2 [(gogoproto.nullable) = false];
// Range of object's payload to return
Range Range = 2 [(gogoproto.nullable) = false];
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

View file

@ -64,7 +64,7 @@ rpc Put(stream PutRequest) returns (PutResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc Head(HeadRequest) returns (HeadResponse);
rpc Search(SearchRequest) returns (stream SearchResponse);
rpc GetRange(GetRangeRequest) returns (GetRangeResponse);
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
```
@ -120,8 +120,7 @@ from all messages. Addresses from resulting list are expected to be unique.
| Search | [SearchRequest](#object.SearchRequest) | [SearchResponse](#object.SearchResponse) |
#### Method GetRange
GetRange of data payload. Ranges are set of pairs (offset, length).
Fragments order in response corresponds to ranges order in request.
GetRange of data payload. Range is a pair (offset, length).
| Name | Input | Output |
| ---- | ----- | ------ |