[#1412] engine: Add IsIndexedContainer flag

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-10-01 15:27:06 +03:00
parent 899cd55c27
commit 1b520f7973
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
19 changed files with 182 additions and 50 deletions

View file

@ -22,7 +22,8 @@ import (
// PutPrm groups the parameters of Put operation.
type PutPrm struct {
Object *objectSDK.Object
Object *objectSDK.Object
IsIndexedContainer bool
}
var errPutShard = errors.New("could not put object to any shard")
@ -194,6 +195,6 @@ func (e *StorageEngine) putToShard(ctx context.Context, sh hashedShard, pool uti
}
// Put writes provided object to local storage.
func Put(ctx context.Context, storage *StorageEngine, obj *objectSDK.Object) error {
return storage.Put(ctx, PutPrm{Object: obj})
func Put(ctx context.Context, storage *StorageEngine, obj *objectSDK.Object, indexedContainer bool) error {
return storage.Put(ctx, PutPrm{Object: obj, IsIndexedContainer: indexedContainer})
}