forked from TrueCloudLab/frostfs-api-go
Merge pull request #46 from nspcc-dev/object-GetRange-stream
make object.GetRange to be server-side streaming RPC
This commit is contained in:
commit
2057710f22
3 changed files with 11 additions and 9 deletions
|
@ -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);
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -119,8 +119,9 @@ package).
|
||||||
| 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.
|
Requested range can be restored by concatenation of all chunks
|
||||||
|
keeping receiving order.
|
||||||
|
|
||||||
| Name | Input | Output |
|
| Name | Input | Output |
|
||||||
| ---- | ----- | ------ |
|
| ---- | ----- | ------ |
|
||||||
|
@ -196,7 +197,7 @@ in distributed system.
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| Address | [refs.Address](#refs.Address) | | Address of object (container id + object id) |
|
| 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) |
|
| 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) |
|
| 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.
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue