[#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:
Leonard Lyubich 2021-06-22 19:00:00 +03:00 committed by Leonard Lyubich
parent d6bb697726
commit cede2b4ed7
6 changed files with 50 additions and 32 deletions

View file

@ -37,8 +37,11 @@ func (i *OnlyKeyRemoteServerInfo) PublicKey() []byte {
return i.Key
}
func (*OnlyKeyRemoteServerInfo) Address() string {
return ""
func (*OnlyKeyRemoteServerInfo) IterateAddresses(func(string) bool) {
}
func (*OnlyKeyRemoteServerInfo) NumberOfAddresses() int {
return 0
}
const invalidPrmValFmt = "invalid parameter %s (%T):%v"