Documentation
¶
Overview ¶
Package dns contains DNS related functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLocalOrPrivate ¶ added in v0.83.0
IsLocalOrPrivate reports whether hostURL (without a scheme) refers to a host reachable without a public network round-trip - loopback/localhost, a private-network IP (RFC1918/RFC4193), or a .local/.localhost domain - used for choosing to access services over plain HTTP. hostURL may include a port.
func IsLocalhost ¶ added in v0.51.0
IsLocalhost reports whether host is the localhost hostname or a loopback IP (127.0.0.0/8 or ::1). host must be a bare hostname or IP, without a port.
func IsServiceURL ¶
IsServiceURL returns true if the give url complies with the service url format.
func ParseServiceURL ¶
ParseServiceURL takes a serviceURL and parses it to find the service info for connecting to the cluster. The string is expected to follow the following format: Example serviceURL: http://{SERVICE_NAME}.{NAMESPACE}.svc.cluster.local:{PORT}.
Types ¶
This section is empty.