package netutil

import "github.com/coreos/etcd/pkg/netutil"

Index

Functions

func BasicAuth

func BasicAuth(r *http.Request) (username, password string, ok bool)

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 DropPort(port int) error

DropPort drops all tcp packets that are received from the given port and sent to the given port.

func RecoverPort

func RecoverPort(port int) error

RecoverPort stops dropping tcp packets at given port.

func ResolveTCPAddrs

func ResolveTCPAddrs(urls ...[]url.URL) error

ResolveTCPAddrs is a convenience wrapper for net.ResolveTCPAddr. ResolveTCPAddrs resolves all DNS hostnames in-place for the given set of url.URLs.

Source Files

isolate_linux.go netutil.go

Version
v2.1.0+incompatible
Published
Jul 21, 2015
Platform
linux/amd64
Imports
8 packages
Last checked
4 minutes ago

Tools for package owners.