Documentation ¶
Index ¶
- Variables
- func CreateDefaultClient(certPool *x509.CertPool) *http.Client
- func CreateDefaultClientInsecureSkipVerify() *http.Client
- func NewMutualTLSClient(identity tls.Certificate, caCertPool *x509.CertPool, serverName string) *http.Client
- type Client
- type DialFunc
- type HTTPClient
- func (c *HTTPClient) Delete(endpoint string) (*http.Response, error)
- func (c *HTTPClient) DeleteCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Get(endpoint string) (*http.Response, error)
- func (c *HTTPClient) GetCustomized(endpoint string, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Post(endpoint string, payload []byte) (*http.Response, error)
- func (c *HTTPClient) PostCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- func (c *HTTPClient) Put(endpoint string, payload []byte) (*http.Response, error)
- func (c *HTTPClient) PutCustomized(endpoint string, payload []byte, f func(*http.Request)) (*http.Response, error)
- type Opts
- type ProxyDialer
- type RequestRetryable
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultClient = CreateDefaultClientInsecureSkipVerify()
)
Functions ¶
func NewMutualTLSClient ¶
Types ¶
type Client ¶
type DialFunc ¶
func SOCKS5DialFuncFromEnvironment ¶
func SOCKS5DialFuncFromEnvironment(origDialer DialFunc, socks5Proxy ProxyDialer) DialFunc
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(client Client, logger boshlog.Logger) *HTTPClient
func NewHTTPClientOpts ¶
func NewHTTPClientOpts(client Client, logger boshlog.Logger, opts Opts) *HTTPClient
func (*HTTPClient) DeleteCustomized ¶
func (*HTTPClient) GetCustomized ¶
func (*HTTPClient) PostCustomized ¶
func (*HTTPClient) PutCustomized ¶
type RequestRetryable ¶
type RequestRetryable struct {
// contains filtered or unexported fields
}
func NewRequestRetryable ¶
func (*RequestRetryable) Attempt ¶
func (r *RequestRetryable) Attempt() (bool, error)
func (*RequestRetryable) Response ¶
func (r *RequestRetryable) Response() *http.Response
Click to show internal directories.
Click to hide internal directories.