istio: Index | Files

package network

import ""


Package Files



var ErrResolveNoAddress = errors.New("no address specified")

ErrResolveNoAddress error occurs when IP address resolution is attempted, but no address was provided.

func GetPrivateIPs Uses

func GetPrivateIPs(ctx context.Context) ([]string, bool)

GetPrivateIPs blocks until private IP addresses are available, or a timeout is reached.

func ResolveAddr Uses

func ResolveAddr(addr string, lookupIPAddr ...lookupIPAddrType) (string, error)

ResolveAddr resolves an authority address to an IP address. Incoming addr can be an IP address or hostname. If addr is an IPv6 address, the IP part must be enclosed in square brackets.

LookupIPAddr() may return multiple IP addresses, of which this function returns the first IPv4 entry. To use this function in an IPv6 only environment, either provide an IPv6 address or ensure the hostname resolves to only IPv6 addresses.

Package network imports 6 packages (graph) and is imported by 2 packages. Updated 2020-08-14. Refresh now. Tools for package owners.