From 1fe7f7b2faf02483eed1a2f52bd1c57d7b410fe2 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Wed, 5 Feb 2020 13:42:49 +0300 Subject: [PATCH] make object.GetRange to be server-side streaming RPC --- docs/object.md | 9 +++++---- object/service.pb.go | Bin 122795 -> 123088 bytes object/service.proto | 11 ++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/object.md b/docs/object.md index dbdd6dc..997991a 100644 --- a/docs/object.md +++ b/docs/object.md @@ -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) | diff --git a/object/service.pb.go b/object/service.pb.go index 05e7c4b370689e275c5b1a56b1029b1b432003f8..0e40508d44a3d7fbbaffdeba7cf9aa903ba924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