forked from TrueCloudLab/frostfs-node
[#488] storage/calculator: Make alpha
dynamic
Delete reading `alpha` from env var. Cover retrieving `alpha` behind interface in intermediate calculator. Add TODO to decide if it is necessary to receive that param from global config or not. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
ad4a55468e
commit
2c8c9f69c8
6 changed files with 34 additions and 14 deletions
|
@ -25,3 +25,13 @@ func (c *DaughtersTrustCalculator) Calculate(ctx eigentrustctrl.IterationContext
|
|||
|
||||
c.Calculator.Calculate(calcPrm)
|
||||
}
|
||||
|
||||
// AlphaProvider provides required alpha parameter of eigen trust algorithm.
|
||||
// TODO: decide if `Alpha` should be dynamically read from global config. #497
|
||||
type AlphaProvider struct {
|
||||
Alpha float64
|
||||
}
|
||||
|
||||
func (ap AlphaProvider) EigenTrustAlpha() (float64, error) {
|
||||
return ap.Alpha, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue