net

package
v0.0.0-...-d2438c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = "8080"

DefaultPort defines a default port used through out This should be a dependency

Variables

This section is empty.

Functions

func EnsureHTTPS

func EnsureHTTPS(address string) string

EnsureHTTPS attempts to ensure that the address passed to it has the correct protocol for dealing with the cluster.

func InMemoryNetwork

func InMemoryNetwork() (net.Listener, func() net.Conn)

InMemoryNetwork creates a fully in-memory listener and dial function.

Each time the dial function is invoked a new pair of net.Conn objects will be created using net.Pipe: the listener's Accept method will unblock and return one end of the pipe and the other end will be returned by the dial function.

func ListenAddresses

func ListenAddresses(value string) ([]string, error)

ListenAddresses returns a list of host:port combinations at which this machine can be reached

func ProxyFromEnvironment

func ProxyFromEnvironment(req *http.Request) (*url.URL, error)

ProxyFromEnvironment is basically the same as golang's ProxyFromEnvironment, except it doesn't fall back to http_proxy when https_proxy isn't around, which is incorrect behavior. It still respects HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.

func RFC3493Dialer

func RFC3493Dialer(network, address string) (net.Conn, error)

RFC3493Dialer creates a new connection in the form of a RFC3493 standards.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL