package netutil
import "github.com/coreos/etcd/pkg/netutil"
Index ¶
- func BasicAuth(r *http.Request) (username, password string, ok bool)
- func DropPort(port int) error
- func RecoverPort(port int) error
- func ResolveTCPAddrs(urls ...[]url.URL) error
- func URLStringsEqual(a []string, b []string) bool
- func URLsEqual(a []url.URL, b []url.URL) bool
Functions ¶
func BasicAuth ¶
BasicAuth returns the username and password provided in the request's Authorization header, if the request uses HTTP Basic Authentication. See RFC 2617, Section 2. Based on the BasicAuth method from the Golang standard lib. TODO: use the standard lib BasicAuth method when we move to Go 1.4.
func DropPort ¶
func RecoverPort ¶
func ResolveTCPAddrs ¶
ResolveTCPAddrs is a convenience wrapper for net.ResolveTCPAddr. ResolveTCPAddrs resolves all DNS hostnames in-place for the given set of url.URLs.
func URLStringsEqual ¶
func URLsEqual ¶
URLsEqual checks equality of url.URLS between two arrays. This check pass even if an URL is in hostname and opposite is in IP address.
Source Files ¶
- Version
- v2.1.0-alpha.0+incompatible
- Published
- Apr 23, 2015
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 35 minutes ago –
Tools for package owners.