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
|
@ -225,7 +225,7 @@ func (r *remoteLoadAnnounceProvider) InitRemote(srv loadroute.ServerInfo) (loadc
|
|||
return nil, fmt.Errorf("could not convert address to IP format: %w", err)
|
||||
}
|
||||
|
||||
if network.IsLocalAddress(r.loadAddrSrc, netAddr) {
|
||||
if network.IsLocalAddress(r.loadAddrSrc, network.GroupFromAddress(netAddr)) {
|
||||
// if local => return no-op writer
|
||||
return loadcontroller.SimpleWriterProvider(new(nopLoadWriter)), nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue