Documentation ¶
Overview ¶
This packages contains a few utility functions for network related functions.
Index ¶
- func FullyQualifiedHostname() (string, error)
- func FullyQualifiedHostnameOrPanic() string
- func ResolveAddr(addr string) (string, error)
- func ResolveIPv4Addr(addr string) (string, error)
- func ResolveIpAddr(addr string) (string, error)
- func SortRfc2782(srvs []*net.SRV)
- func SplitHostPort(addr string) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullyQualifiedHostname ¶
FullyQualifiedHostname returns the full hostname with domain
func FullyQualifiedHostnameOrPanic ¶
func FullyQualifiedHostnameOrPanic() string
FullyQualifiedHostnameOrPanic is the same as FullyQualifiedHostname but panics in case of error
func ResolveAddr ¶
ResolveAddr can resolve an address where the host has been left blank, like ":3306"
func ResolveIPv4Addr ¶
ResolveIpAddr resolves the address:port part into an IP address:port pair
func ResolveIpAddr ¶
ResolveIpAddr resolves the address:port part into an IP address:port pair
func SortRfc2782 ¶
SortRfc2782 reorders SRV records as specified in RFC 2782.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.