net

package
v0.0.0-...-905ac89 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string) ([]byte, error)

Get does a GET request and returns the result, returns an error if the StatusCode was not 2xx

func GetHTTPClientTimeout

func GetHTTPClientTimeout(timeout time.Duration) *http.Client

GetHTTPClientTimeout returns a HTTP client with a specified timeout

func GetHTTPClientTimeoutWithoutKeepAlive

func GetHTTPClientTimeoutWithoutKeepAlive(timeout time.Duration) *http.Client

GetHTTPClientTimeoutWithoutKeepAlive returns a HTTP client with a specified timeout and without http keep alive

func GetPesterClient

func GetPesterClient(timeout time.Duration, concurrency int, retries int) *pester.Client

GetPesterClient returns a Pester client with the specified variables

func GetResilient

func GetResilient(url string) ([]byte, error)

GetResilient does a GET request with up to three retries and concurrency, and returns the result, returns an error if the StatusCode was not 2xx

func GetTimeout

func GetTimeout(url string, timeout time.Duration) ([]byte, error)

GetTimeout does a GET request and returns the result, with a specified timeout, returns an error if the StatusCode was not 2xx

func GetTimeoutAndRetries

func GetTimeoutAndRetries(url string, timeout time.Duration, retries int) ([]byte, error)

GetTimeoutAndRetries does a GET request, with up to n retries, and returns the result, with a specified timeout, returns an error if the StatusCode was not 2xx

Types

This section is empty.

Jump to

Keyboard shortcuts

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