[#1636] storage: Refactor shard rebuild
Drop redundant interfaces. Rename fields. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
e0dc3c3d0c
commit
ceff5e1f6a
7 changed files with 72 additions and 79 deletions
|
@ -12,16 +12,21 @@ type RebuildRes struct {
|
|||
}
|
||||
|
||||
type RebuildPrm struct {
|
||||
MetaStorage MetaStorage
|
||||
WorkerLimiter ConcurrentWorkersLimiter
|
||||
FillPercent int
|
||||
MetaStorage MetaStorage
|
||||
Limiter RebuildLimiter
|
||||
FillPercent int
|
||||
}
|
||||
|
||||
type MetaStorage interface {
|
||||
UpdateStorageID(ctx context.Context, addr oid.Address, storageID []byte) error
|
||||
}
|
||||
|
||||
type ConcurrentWorkersLimiter interface {
|
||||
AcquireWorkSlot(ctx context.Context) error
|
||||
ReleaseWorkSlot()
|
||||
type ReleaseFunc func()
|
||||
|
||||
type ConcurrencyLimiter interface {
|
||||
AcquireWorkSlot(ctx context.Context) (ReleaseFunc, error)
|
||||
}
|
||||
|
||||
type RebuildLimiter interface {
|
||||
ConcurrencyLimiter
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue