forked from TrueCloudLab/frostfs-api
make object.GetRange to be server-side streaming RPC
This commit is contained in:
parent
63b956e50c
commit
6bd0d99ddd
2 changed files with 8 additions and 8 deletions
|
@ -42,9 +42,10 @@ service Service {
|
||||||
// package).
|
// package).
|
||||||
rpc Search(SearchRequest) returns (stream SearchResponse);
|
rpc Search(SearchRequest) returns (stream SearchResponse);
|
||||||
|
|
||||||
// GetRange of data payload. Ranges are set of pairs (offset, length).
|
// GetRange of data payload. Range is a pair (offset, length).
|
||||||
// Fragments order in response corresponds to ranges order in request.
|
// Requested range can be restored by concatenation of all chunks
|
||||||
rpc GetRange(GetRangeRequest) returns (GetRangeResponse);
|
// keeping receiving order.
|
||||||
|
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
|
||||||
|
|
||||||
// GetRangeHash returns homomorphic hash of object payload range after XOR
|
// GetRangeHash returns homomorphic hash of object payload range after XOR
|
||||||
// operation. Ranges are set of pairs (offset, length). Hashes order in
|
// operation. Ranges are set of pairs (offset, length). Hashes order in
|
||||||
|
@ -153,8 +154,8 @@ message SearchResponse {
|
||||||
message GetRangeRequest {
|
message GetRangeRequest {
|
||||||
// Address of object (container id + object id)
|
// Address of object (container id + object id)
|
||||||
refs.Address Address = 1 [(gogoproto.nullable) = false];
|
refs.Address Address = 1 [(gogoproto.nullable) = false];
|
||||||
// Ranges of object's payload to return
|
// Range of object's payload to return
|
||||||
repeated Range Ranges = 2 [(gogoproto.nullable) = false];
|
Range Range = 2 [(gogoproto.nullable) = false];
|
||||||
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
||||||
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
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)
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
||||||
|
|
|
@ -64,7 +64,7 @@ rpc Put(stream PutRequest) returns (PutResponse);
|
||||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||||
rpc Head(HeadRequest) returns (HeadResponse);
|
rpc Head(HeadRequest) returns (HeadResponse);
|
||||||
rpc Search(SearchRequest) returns (stream SearchResponse);
|
rpc Search(SearchRequest) returns (stream SearchResponse);
|
||||||
rpc GetRange(GetRangeRequest) returns (GetRangeResponse);
|
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
|
||||||
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
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) |
|
| Search | [SearchRequest](#object.SearchRequest) | [SearchResponse](#object.SearchResponse) |
|
||||||
#### Method GetRange
|
#### Method GetRange
|
||||||
|
|
||||||
GetRange of data payload. Ranges are set of pairs (offset, length).
|
GetRange of data payload. Range is a pair (offset, length).
|
||||||
Fragments order in response corresponds to ranges order in request.
|
|
||||||
|
|
||||||
| Name | Input | Output |
|
| Name | Input | Output |
|
||||||
| ---- | ----- | ------ |
|
| ---- | ----- | ------ |
|
||||||
|
|
Loading…
Reference in a new issue