Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangePort ¶ added in v0.54.0
ChangePort changes port in every address in the provided list to the specified value. Addresses should be in the "host:port" form.
func VerifyAddresses ¶ added in v0.58.0
VerifyAddresses validates public addresses of ni.
func WriteToNodeInfo ¶ added in v0.22.0
func WriteToNodeInfo(g AddressGroup, ni *netmap.NodeInfo)
WriteToNodeInfo writes AddressGroup to netmap.NodeInfo structure.
Types ¶
type AddressGroup ¶ added in v0.22.0
type AddressGroup []string
AddressGroup represents list of network addresses of the node.
func (*AddressGroup) FromNodeInfo ¶ added in v0.53.0
func (x *AddressGroup) FromNodeInfo(ni netmap.NodeInfo) error
FromNodeInfo forms AddressGroup from netmap.NodeInfo structure.
Returns an error in the absence of addresses or if any of the addresses are incorrect.
func (*AddressGroup) FromStringSlice ¶ added in v0.33.0
func (x *AddressGroup) FromStringSlice(addr []string) error
FromStringSlice forms AddressGroup from a string slice.
Returns an error in the absence of addresses or if any of the addresses are incorrect.
func (AddressGroup) Intersects ¶ added in v0.22.0
func (x AddressGroup) Intersects(x2 AddressGroup) bool
Intersects checks if two AddressGroup have at least one common address.
func (AddressGroup) String ¶ added in v0.51.0
func (x AddressGroup) String() string
String implements fmt.Stringer for AddressGroup. Returns concatenation of all addresses from the AddressGroup. The result is order-dependent.