forked from TrueCloudLab/frostfs-node
[#488] reputation/common: Move ServerInfo
to common
pkg
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
f7aa79f0b6
commit
e69917b27a
8 changed files with 32 additions and 32 deletions
|
@ -5,20 +5,6 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/pkg/services/reputation/common"
|
||||
)
|
||||
|
||||
// ServerInfo describes a set of
|
||||
// characteristics of a point in a route.
|
||||
type ServerInfo interface {
|
||||
// PublicKey returns public key of the node
|
||||
// from the route in a binary representation.
|
||||
PublicKey() []byte
|
||||
|
||||
// Returns network address of the node
|
||||
// in the route.
|
||||
//
|
||||
// Can be empty.
|
||||
Address() string
|
||||
}
|
||||
|
||||
// Builder groups methods to route values in the network.
|
||||
type Builder interface {
|
||||
// NextStage must return next group of route points
|
||||
|
@ -28,7 +14,7 @@ type Builder interface {
|
|||
// 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.
|
||||
NextStage(epoch uint64, t reputation.Trust, passed []ServerInfo) ([]ServerInfo, error)
|
||||
NextStage(epoch uint64, t reputation.Trust, passed []common.ServerInfo) ([]common.ServerInfo, error)
|
||||
}
|
||||
|
||||
// RemoteWriterProvider describes the component
|
||||
|
@ -38,5 +24,5 @@ type RemoteWriterProvider interface {
|
|||
// corresponding to info.
|
||||
//
|
||||
// Nil info matches the end of the route.
|
||||
InitRemote(info ServerInfo) (common.WriterProvider, error)
|
||||
InitRemote(info common.ServerInfo) (common.WriterProvider, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue