forked from TrueCloudLab/frostfs-node
[#607] network: Generalize LocalAddressSource to address group
Make `LocalAddressSource.LocalAddress` method to return `AddressGroup`. Make `IsLocalAddress` function to accept parameter of type `AddressGroup`. Adopt the application code with temporary `GroupFromAddress` helper. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e11f50ec8e
commit
6e5d7f84af
7 changed files with 15 additions and 15 deletions
|
@ -90,7 +90,7 @@ type cfg struct {
|
|||
|
||||
cfgNodeInfo cfgNodeInfo
|
||||
|
||||
localAddr network.Address
|
||||
localAddr network.AddressGroup
|
||||
|
||||
cfgObject cfgObject
|
||||
|
||||
|
@ -285,7 +285,7 @@ func initCfg(path string) *cfg {
|
|||
tlsCertFile: tlsCertFile,
|
||||
tlsKeyFile: tlsKeyFile,
|
||||
},
|
||||
localAddr: netAddr,
|
||||
localAddr: network.GroupFromAddress(netAddr),
|
||||
respSvc: response.NewService(
|
||||
response.WithNetworkState(state),
|
||||
),
|
||||
|
@ -308,7 +308,7 @@ func initCfg(path string) *cfg {
|
|||
return c
|
||||
}
|
||||
|
||||
func (c *cfg) LocalAddress() network.Address {
|
||||
func (c *cfg) LocalAddress() network.AddressGroup {
|
||||
return c.localAddr
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue