util

package
v0.0.0-...-fd97e0e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPClient

func HTTPClient(rootCA string, proxyAddrFN eventual.Getter) (*http.Client, error)

HTTPClient creates an http.Client. If rootCA is specified, the client will validate the server's certificate on TLS connections against that RootCA. If proxyAddr is specified, the client will proxy through the given http proxy.

func NewChainedAndFronted

func NewChainedAndFronted(proxyAddrFN eventual.Getter) *chainedAndFronted

NewChainedAndFronted creates a new struct for accessing resources using chained and direct fronted servers in parallel.

func PersistentHTTPClient

func PersistentHTTPClient(rootCA string, proxyAddrFN eventual.Getter) (*http.Client, error)

PersistentHTTPClient creates an http.Client that persists across requests. If rootCA is specified, the client will validate the server's certificate on TLS connections against that RootCA. If proxyAddr is specified, the client will proxy through the given http proxy.

Types

type HTTPFetcher

type HTTPFetcher interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPFetcher is a simple interface for types that are able to fetch data over HTTP.

Jump to

Keyboard shortcuts

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