network

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L4Protocol = "tcp"
)

Variables

This section is empty.

Functions

func IPAddrFromMultiaddr added in v0.14.0

func IPAddrFromMultiaddr(multiaddr string) (string, error)

IPAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "192.168.0.1:8080".

func IsLocalAddress added in v0.12.0

func IsLocalAddress(src LocalAddressSource, addr *Address) bool

IsLocalAddress returns true if network endpoint from local address source is equal to network endpoint of passed address.

Types

type Address

type Address struct {
	// contains filtered or unexported fields
}

Address represents the NeoFS node network address.

func AddressFromString added in v0.12.0

func AddressFromString(s string) (*Address, error)

AddressFromString restores address from a multiaddr string representation.

func (Address) IPAddrString added in v0.12.0

func (a Address) IPAddrString() (string, error)

IPAddrString returns network endpoint address in string format.

func (Address) String added in v0.12.0

func (a Address) String() string

String returns multiaddr string

type LocalAddressSource added in v0.12.0

type LocalAddressSource interface {
	LocalAddress() *Address
}

LocalAddressSource is an interface of local network address container with read access.

Directories

Path Synopsis
transport

Jump to

Keyboard shortcuts

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