Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect dials the given address and returns a net.Conn. The protoAddr argument should be prefixed with the protocol, eg. "tcp://127.0.0.1:8080" or "unix:///tmp/test.sock"
func GetFreePort ¶
GetFreePort gets a free port from the operating system. Ripped from https://github.com/phayes/freeport. BSD-licensed.
func HttpGet ¶
HttpGet sends a GET request to the specified url with timeout and return the response.
func HttpRequest ¶
HttpRequest sends the specified HTTP requests with timeout and return the response. For stability and security reason, we need to be available request timeouts, so http.Client{} and http.Get() are overridden with functions that rely on this function.
func ProtocolAndAddress ¶
ProtocolAndAddress splits an address into the protocol and address components. For instance, "tcp://127.0.0.1:8080" will be split into "tcp" and "127.0.0.1:8080". If the address has no protocol prefix, the default is "tcp".
Types ¶
This section is empty.