client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHostConnectionPool

func CreateHostConnectionPool(host string)

func GetSchemeHostKey

func GetSchemeHostKey(urlString string) (string, error)

Types

type HTTPClient

type HTTPClient struct {
	*http.Client
	// contains filtered or unexported fields
}

HTTPClient is a wrapper around http.Client that allows for limiting the number of concurrent connections per host utilizing a client pool. If the MaxConnPerHost option is not set, the client pool will not be used.

func AcquireClient

func AcquireClient(host string) (*HTTPClient, error)

func (*HTTPClient) Done

func (c *HTTPClient) Done()

Done releases the semaphore. This is a simple utility function that should be called in a defer statement.

type R8GetRetryingRoundTripper

type R8GetRetryingRoundTripper struct {
	Transport *http.Transport
}

R8GetRetryingRoundTripper is a wrapper around http.Transport that allows for retrying failed requests

func (R8GetRetryingRoundTripper) RoundTrip

func (rt R8GetRetryingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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