addr

package
v0.0.0-...-6cef876 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MaxIDLength = 250

Variables

View Source
var ErrInvalidAddr = errors.New("forwarder: invalid addr")

Functions

This section is empty.

Types

type Addr

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

func New

func New(relay netip.AddrPort, id ID) *Addr

func Resolve

func Resolve(addr string) (*Addr, error)

func (*Addr) ID

func (a *Addr) ID() ID

func (*Addr) Network

func (a *Addr) Network() string

func (*Addr) Relay

func (a *Addr) Relay() netip.AddrPort

func (*Addr) String

func (a *Addr) String() string

type ID

type ID []byte

func ParseID

func ParseID(id string) (ID, error)

func (ID) Encode

func (id ID) Encode() []byte

func (ID) String

func (id ID) String() string

func (ID) Valid

func (id ID) Valid() bool

Jump to

Keyboard shortcuts

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