network

package
v0.58.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePort added in v0.54.0

func ChangePort(addrs []string, port uint16) ([]string, error)

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

func VerifyAddresses(ni netmap.NodeInfo) error

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL