forked from TrueCloudLab/frostfs-node
[#607] reputation,container: Support address groups in ServerInfo
There is a need to support multiple server endpoints for reputation and container transmission. Replace `ServerInfo.Address` getter with `ServerInfo.IterateAddresses` iterator. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
d6bb697726
commit
cede2b4ed7
6 changed files with 50 additions and 32 deletions
|
@ -69,9 +69,11 @@ type ServerInfo interface {
|
|||
// from the route in a binary representation.
|
||||
PublicKey() []byte
|
||||
|
||||
// Returns network address of the node
|
||||
// in the route.
|
||||
//
|
||||
// Can be empty.
|
||||
Address() string
|
||||
// Iterates over network addresses of the node
|
||||
// in the route. Breaks iterating on true return
|
||||
// of the handler.
|
||||
IterateAddresses(func(string) bool)
|
||||
|
||||
// Returns number of server's network addresses.
|
||||
NumberOfAddresses() int
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue