From 7512a5ba18017f0a83be0100a935a36bae17219c Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 30 Nov 2020 19:16:20 +0300 Subject: [PATCH] [#220] blobstor: Implement "small" operations Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/blobstor/delete_small.go | 2 +- pkg/local_object_storage/blobstor/get_range_small.go | 4 ++-- pkg/local_object_storage/blobstor/get_small.go | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/local_object_storage/blobstor/delete_small.go b/pkg/local_object_storage/blobstor/delete_small.go index 693079a74..a0585868d 100644 --- a/pkg/local_object_storage/blobstor/delete_small.go +++ b/pkg/local_object_storage/blobstor/delete_small.go @@ -19,5 +19,5 @@ type DeleteSmallRes struct{} // // Returns ErrObjectNotFound if there is no object to delete. func (b *BlobStor) DeleteSmall(prm *DeleteSmallPrm) (*DeleteSmallRes, error) { - panic("implement me") + return b.blobovniczas.delete(prm) } diff --git a/pkg/local_object_storage/blobstor/get_range_small.go b/pkg/local_object_storage/blobstor/get_range_small.go index 7c955117c..c6795a76d 100644 --- a/pkg/local_object_storage/blobstor/get_range_small.go +++ b/pkg/local_object_storage/blobstor/get_range_small.go @@ -19,6 +19,6 @@ type GetRangeSmallRes struct { // // Returns any error encountered that // did not allow to completely read the object payload range. -func (b *BlobStor) GetRangeSmall(prm *GetRangeBigPrm) (*GetRangeBigRes, error) { - panic("implement me") +func (b *BlobStor) GetRangeSmall(prm *GetRangeSmallPrm) (*GetRangeSmallRes, error) { + return b.blobovniczas.getRange(prm) } diff --git a/pkg/local_object_storage/blobstor/get_small.go b/pkg/local_object_storage/blobstor/get_small.go index 667daf89f..f7af3b36e 100644 --- a/pkg/local_object_storage/blobstor/get_small.go +++ b/pkg/local_object_storage/blobstor/get_small.go @@ -1,9 +1,5 @@ package blobstor -import ( - "github.com/pkg/errors" -) - // GetSmallPrm groups the parameters of GetSmallPrm operation. type GetSmallPrm struct { address @@ -23,5 +19,5 @@ type GetSmallRes struct { // Returns any error encountered that // did not allow to completely read the object. func (b *BlobStor) GetSmall(prm *GetSmallPrm) (*GetSmallRes, error) { - return nil, errors.New("method GetSmall is not implemented yet") + return b.blobovniczas.get(prm) }