multihost

package
v0.0.0-...-d92f398 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MH

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

MH is a list of hostnames and/or ip addresses for one endpoint.

func New

func New(id string) *MH

New returns a new multihost with the given id.

func (*MH) Add

func (h *MH) Add(domainsOrIps []string) int

Add appends the list of IPs, hostnames, and hostname's IPs as resolved.

func (*MH) Addrs

func (h *MH) Addrs() []netip.Addr

func (*MH) AnyAddr

func (h *MH) AnyAddr() string

func (*MH) EqualAddrs

func (h *MH) EqualAddrs(other *MH) bool

func (*MH) Len

func (h *MH) Len() int

func (MH) Lock

func (MH) Lock()

func (*MH) Names

func (h *MH) Names() []string

func (MH) RLock

func (MH) RLock()

func (MH) RUnlock

func (MH) RUnlock()

func (*MH) Refresh

func (h *MH) Refresh() int

Refresh re-adds the list of IPs, hostnames, and re-resolves the hostname.

func (*MH) String

func (h *MH) String() string

func (MH) Unlock

func (MH) Unlock()

func (*MH) With

func (h *MH) With(domainsOrIps []string) int

With sets the list of IPs, hostnames, and hostname's IPs as resolved.

Jump to

Keyboard shortcuts

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