Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
49 lines
1.3 KiB
Go
49 lines
1.3 KiB
Go
package audit
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/processors/settlement/common"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/audit"
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
|
)
|
|
|
|
// CalculatorPrm groups the parameters of Calculator's constructor.
|
|
type CalculatorPrm struct {
|
|
ResultStorage ResultStorage
|
|
|
|
ContainerStorage common.ContainerStorage
|
|
|
|
PlacementCalculator common.PlacementCalculator
|
|
|
|
SGStorage SGStorage
|
|
|
|
AccountStorage common.AccountStorage
|
|
|
|
Exchanger common.Exchanger
|
|
|
|
AuditFeeFetcher FeeFetcher
|
|
}
|
|
|
|
// ResultStorage is an interface of storage of the audit results.
|
|
type ResultStorage interface {
|
|
// Must return all audit results by epoch number.
|
|
AuditResultsForEpoch(epoch uint64) ([]*audit.Result, error)
|
|
}
|
|
|
|
// SGInfo groups the data about FrostFS storage group
|
|
// necessary for calculating audit fee.
|
|
type SGInfo interface {
|
|
// Must return sum size of the all group members.
|
|
Size() uint64
|
|
}
|
|
|
|
// SGStorage is an interface of storage of the storage groups.
|
|
type SGStorage interface {
|
|
// Must return information about the storage group by address.
|
|
SGInfo(oid.Address) (SGInfo, error)
|
|
}
|
|
|
|
// FeeFetcher wraps AuditFee method that returns audit fee price from
|
|
// the network configuration.
|
|
type FeeFetcher interface {
|
|
AuditFee() (uint64, error)
|
|
}
|