2023-09-21 15:18:20 +00:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2023-09-22 10:07:32 +00:00
|
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
2023-09-21 15:18:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type RebuildRes struct {
|
|
|
|
ObjectsMoved uint64
|
|
|
|
FilesRemoved uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
type RebuildPrm struct {
|
2023-10-03 08:58:35 +00:00
|
|
|
MetaStorage MetaStorage
|
|
|
|
WorkerLimiter ConcurrentWorkersLimiter
|
2024-09-04 06:30:56 +00:00
|
|
|
FillPercent int
|
2023-09-21 15:18:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type MetaStorage interface {
|
2023-09-22 10:07:32 +00:00
|
|
|
UpdateStorageID(ctx context.Context, addr oid.Address, storageID []byte) error
|
2023-09-21 15:18:20 +00:00
|
|
|
}
|
2023-10-03 08:58:35 +00:00
|
|
|
|
|
|
|
type ConcurrentWorkersLimiter interface {
|
|
|
|
AcquireWorkSlot(ctx context.Context) error
|
|
|
|
ReleaseWorkSlot()
|
|
|
|
}
|