forked from TrueCloudLab/frostfs-node
[#1412] engine: Add IsIndexedContainer
flag
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
899cd55c27
commit
1b520f7973
19 changed files with 182 additions and 50 deletions
|
@ -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})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue