2021-04-17 19:17:30 +00:00
|
|
|
package router
|
2021-04-02 18:16:09 +00:00
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/reputation"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/reputation/common"
|
2021-04-02 18:16:09 +00:00
|
|
|
)
|
|
|
|
|
2021-04-03 06:11:12 +00:00
|
|
|
// Builder groups methods to route values in the network.
|
|
|
|
type Builder interface {
|
|
|
|
// NextStage must return next group of route points
|
2021-04-17 16:15:38 +00:00
|
|
|
// for passed epoch and trust values.
|
2021-04-03 06:11:12 +00:00
|
|
|
// Implementation must take into account already passed route points.
|
|
|
|
//
|
|
|
|
// Empty passed list means being at the starting point of the route.
|
|
|
|
//
|
|
|
|
// Must return empty list and no error if the endpoint of the route is reached.
|
2021-04-23 14:54:55 +00:00
|
|
|
NextStage(epoch uint64, t reputation.Trust, passed []common.ServerInfo) ([]common.ServerInfo, error)
|
2021-04-03 06:11:12 +00:00
|
|
|
}
|
|
|
|
|
2021-04-02 18:16:09 +00:00
|
|
|
// RemoteWriterProvider describes the component
|
|
|
|
// for sending values to a fixed route point.
|
|
|
|
type RemoteWriterProvider interface {
|
|
|
|
// InitRemote must return WriterProvider to the route point
|
|
|
|
// corresponding to info.
|
|
|
|
//
|
|
|
|
// Nil info matches the end of the route.
|
2021-04-23 14:54:55 +00:00
|
|
|
InitRemote(info common.ServerInfo) (common.WriterProvider, error)
|
2021-04-02 18:16:09 +00:00
|
|
|
}
|