make object.GetRange to be server-side streaming RPC

This commit is contained in:
Evgeniy Kulikov 2020-02-05 13:42:49 +03:00
parent 1be95ee2a1
commit 1fe7f7b2fa
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
3 changed files with 11 additions and 9 deletions

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);
```
@ -119,8 +119,9 @@ package).
| 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).
Requested range can be restored by concatenation of all chunks
keeping receiving order.
| Name | Input | Output |
| ---- | ----- | ------ |
@ -196,7 +197,7 @@ in distributed system.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
| Ranges | [Range](#object.Range) | repeated | Ranges of object's payload to return |
| Range | [Range](#object.Range) | | Range of object's payload to return |
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |

Binary file not shown.

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)