forked from TrueCloudLab/frostfs-node
[#645] network: Remove no longer used IsLocalAddress
function
In recent changes, the locality criterion for a node has been changed to compare public keys. Remove no longer used `IsLocalAddress` function and `LocalAddressSource` interface. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
358e3ed8c4
commit
846dd8c89e
1 changed files with 0 additions and 12 deletions
|
@ -23,12 +23,6 @@ type Address struct {
|
||||||
ma multiaddr.Multiaddr
|
ma multiaddr.Multiaddr
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocalAddressSource is an interface of local
|
|
||||||
// network address container with read access.
|
|
||||||
type LocalAddressSource interface {
|
|
||||||
LocalAddress() AddressGroup
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns multiaddr string.
|
// String returns multiaddr string.
|
||||||
func (a Address) String() string {
|
func (a Address) String() string {
|
||||||
return a.ma.String()
|
return a.ma.String()
|
||||||
|
@ -135,9 +129,3 @@ func multiaddrStringFromHostAddr(host string) (string, error) {
|
||||||
|
|
||||||
return strings.Join([]string{prefix, addr, l4Protocol, port}, "/"), nil
|
return strings.Join([]string{prefix, addr, l4Protocol, port}, "/"), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsLocalAddress returns true if network endpoints from local address group
|
|
||||||
// source intersects with network endpoints of passed address group.
|
|
||||||
func IsLocalAddress(src LocalAddressSource, addr AddressGroup) bool {
|
|
||||||
return src.LocalAddress().Intersects(addr)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue