host

package
v0.12.16 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MyIP, _ = GetHostIP(true)

	TryIfaces = []string{"eth0", "eth1", "eth2", "eth3", "eth4", "eth5", "bond0", "bond1", "bond2", "bond3", "bond4", "bond5"}
)

Functions

func GetAllAvailableIPs added in v0.11.36

func GetAllAvailableIPs(v4 bool) ([]string, error)

func GetAllAvailableIPsFromAddrs added in v0.11.36

func GetAllAvailableIPsFromAddrs(addrs []net.Addr, v4 bool) ([]string, error)

func GetAnyAvailableIP

func GetAnyAvailableIP(v4 bool) (string, error)

func GetAnyAvailableIPFromAddrs added in v0.11.36

func GetAnyAvailableIPFromAddrs(addrs []net.Addr, v4 bool) (string, error)

func GetHostIP

func GetHostIP(v4 bool) (string, error)

func GetHostIPByHostname

func GetHostIPByHostname(h string) ([]string, []string, error)

func GetHostIPByInterface

func GetHostIPByInterface(iface string, v4 bool) (string, error)

func GetHostname

func GetHostname() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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