[#241] object/search: Refactor service processing

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-10 15:26:40 +03:00 committed by Alex Vanin
parent 3bfb18386b
commit 611a29f682
23 changed files with 1020 additions and 657 deletions

View file

@ -19,13 +19,19 @@ type GetObjectRangeStream interface {
Send(*object.GetRangeResponse) error
}
// SearchStream is an interface of NeoFS API v2 compatible search streamer.
type SearchStream interface {
util.ServerStream
Send(*object.SearchResponse) error
}
// ServiceServer is an interface of utility
// serving v2 Object service.
type ServiceServer interface {
Get(*object.GetRequest, GetObjectStream) error
Put(context.Context) (object.PutObjectStreamer, error)
Head(context.Context, *object.HeadRequest) (*object.HeadResponse, error)
Search(context.Context, *object.SearchRequest) (object.SearchObjectStreamer, error)
Search(*object.SearchRequest, SearchStream) error
Delete(context.Context, *object.DeleteRequest) (*object.DeleteResponse, error)
GetRange(*object.GetRangeRequest, GetObjectRangeStream) error
GetRangeHash(context.Context, *object.GetRangeHashRequest) (*object.GetRangeHashResponse, error)