[#1298] writecache: Add restore-mode flag for Seal command

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-08-06 13:20:33 +03:00
parent 8e51d7849a
commit 5c01bd5be8
11 changed files with 238 additions and 205 deletions

View file

@ -20,6 +20,11 @@ type Info struct {
Path string
}
type SealPrm struct {
IgnoreErrors bool
RestoreMode bool
}
// Cache represents write-cache for objects.
type Cache interface {
Get(ctx context.Context, address oid.Address) (*objectSDK.Object, error)
@ -36,7 +41,7 @@ type Cache interface {
SetLogger(*logger.Logger)
DumpInfo() Info
Flush(context.Context, bool, bool) error
Seal(context.Context, bool) error
Seal(context.Context, SealPrm) error
Init() error
Open(ctx context.Context, mode mode.Mode) error