From 63b956e50c5e9082cc505f57b0d6ed090df5f982 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 3 Feb 2020 12:08:18 +0300 Subject: [PATCH] make object.Search to be server-side streaming RPC --- object/service.proto | 2 +- proto-docs/object.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/object/service.proto b/object/service.proto index 12f9741..4487a49 100644 --- a/object/service.proto +++ b/object/service.proto @@ -40,7 +40,7 @@ service Service { // Search objects in container. Version of query language format SHOULD BE // set to 1. Search query represented in serialized format (see query // package). - rpc Search(SearchRequest) returns (SearchResponse); + 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. diff --git a/proto-docs/object.md b/proto-docs/object.md index e749b98..f19b6f1 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -63,7 +63,7 @@ rpc Get(GetRequest) returns (stream GetResponse); rpc Put(stream PutRequest) returns (PutResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Head(HeadRequest) returns (HeadResponse); -rpc Search(SearchRequest) returns (SearchResponse); +rpc Search(SearchRequest) returns (stream SearchResponse); rpc GetRange(GetRangeRequest) returns (GetRangeResponse); rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse); @@ -112,7 +112,8 @@ headers are also present. Search objects in container. Version of query language format SHOULD BE set to 1. Search query represented in serialized format (see query -package). +package). Requested list can be restored by concatenation of addresses +from all messages. Addresses from resulting list are expected to be unique. | Name | Input | Output | | ---- | ----- | ------ |