Documentation ¶
Index ¶
- Constants
- func HostAddrFromMultiaddr(multiaddr string) (string, error)
- func IsLocalAddress(src LocalAddressSource, addr *Address) bool
- type Address
- func (a *Address) AddTLS()
- func (a *Address) Decapsulate(addr *Address)
- func (a *Address) Encapsulate(addr *Address)
- func (a Address) Equal(addr *Address) bool
- func (a Address) HostAddrString() (string, error)
- func (a Address) IPAddrString() (string, error)
- func (a Address) String() string
- func (a Address) TLSEnabled() bool
- type LocalAddressSource
Constants ¶
const (
L4Protocol = "tcp"
)
Variables ¶
This section is empty.
Functions ¶
func HostAddrFromMultiaddr ¶ added in v0.20.0
HostAddrFromMultiaddr converts "/dns4/localhost/tcp/8080" to "localhost: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
AddressFromString restores address from a multiaddr string representation.
func (*Address) AddTLS ¶ added in v0.21.0
func (a *Address) AddTLS()
AddTLS encapsulates a Address if there is no TLS yet.
func (*Address) Decapsulate ¶ added in v0.21.0
Decapsulate removes an Address wrapping. For example:
/ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80
func (*Address) Encapsulate ¶ added in v0.21.0
Encapsulate wraps this Address around another. For example:
/ip4/1.2.3.4 encapsulate /tcp/80 = /ip4/1.2.3.4/tcp/80
func (Address) HostAddrString ¶ added in v0.20.0
HostAddrString returns host address in string format.
func (Address) IPAddrString ¶ added in v0.12.0
IPAddrString returns network endpoint address in string format.
func (Address) TLSEnabled ¶ added in v0.21.0
TLSEnabled searches for wrapped TLS protocol in multiaddr.
type LocalAddressSource ¶ added in v0.12.0
type LocalAddressSource interface {
LocalAddress() *Address
}
LocalAddressSource is an interface of local network address container with read access.