[#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
|
@ -68,8 +68,12 @@ func nodeKeyFromNetmap(c *cfg) []byte {
|
|||
return c.cfgNetmap.state.getNodeInfo().PublicKey()
|
||||
}
|
||||
|
||||
func nodeAddressFromNetmap(c *cfg) string {
|
||||
return c.cfgNetmap.state.getNodeInfo().Address()
|
||||
func (c *cfg) iterateNetworkAddresses(f func(string) bool) {
|
||||
c.cfgNetmap.state.getNodeInfo().IterateAddresses(f)
|
||||
}
|
||||
|
||||
func (c *cfg) addressNum() int {
|
||||
return c.cfgNetmap.state.getNodeInfo().NumberOfAddresses()
|
||||
}
|
||||
|
||||
func initNetmapService(c *cfg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue