forked from TrueCloudLab/frostfs-node
[#488] reputation/eigentrust/calculator: Implement calc wrapper
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
d3c1fc7dda
commit
ea781664cf
14 changed files with 294 additions and 53 deletions
|
@ -28,13 +28,27 @@ type TrustIterator interface {
|
|||
|
||||
type PeerTrustsHandler func(reputation.PeerID, TrustIterator) error
|
||||
|
||||
// PeerTrustsIterator must iterate over all nodes(PeerIDs) and provide
|
||||
// TrustIterator for iteration over node's Trusts to others peers.
|
||||
type PeerTrustsIterator interface {
|
||||
Iterate(PeerTrustsHandler) error
|
||||
}
|
||||
|
||||
type DaughterTrustIteratorProvider interface {
|
||||
InitDaughterIterator(Context, reputation.PeerID) (TrustIterator, error)
|
||||
InitAllDaughtersIterator(Context) (PeerTrustsIterator, error)
|
||||
// InitDaughterIterator must init TrustIterator
|
||||
// that iterates over received local trusts from
|
||||
// daughter p for ctx.Epoch() epoch.
|
||||
InitDaughterIterator(ctx Context, p reputation.PeerID) (TrustIterator, error)
|
||||
// InitAllDaughtersIterator must init PeerTrustsIterator
|
||||
// that must iterate over all daughters of the current
|
||||
// node(manager) and all trusts received from them for
|
||||
// ctx.Epoch() epoch.
|
||||
InitAllDaughtersIterator(ctx Context) (PeerTrustsIterator, error)
|
||||
// InitConsumersIterator must init PeerTrustsIterator
|
||||
// that must iterate over all daughters of the current
|
||||
// node(manager) and their consumers' trusts received
|
||||
// from other managers for ctx.Epoch() epoch and
|
||||
// ctx.I() iteration.
|
||||
InitConsumersIterator(Context) (PeerTrustsIterator, error)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue