Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new HTTP client with the provided options. It configures the client with optional TLS settings, proxy settings, and custom headers.
Parameters:
opts - A variadic list of Option functions to configure the client.
Returns:
*http.Client - A pointer to the configured HTTP client. error - An error if the proxy URL is invalid or if there is an issue connecting to the SOCKS5 proxy.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an interface that specifies instrumentation configuration options.
func WithHeaders ¶
WithHeaders returns a new Option that sets the headers for the http client configuration.
func WithProxyURL ¶
WithProxyURL is a function that returns an Option, which sets the proxyURL field of the config struct.
func WithSkipVerify ¶
WithSkipVerify returns a new Option that sets the insecure flag for the http client configuration.
func WithSocksURL ¶
WithSocksURL is a function that returns an Option, which sets the socksURL field of the config struct.
func WithTimeout ¶
WithTimeout returns a new Option that sets the timeout for the client configuration. It takes a time.Duration value representing the timeout duration. It returns an optionFunc that sets the timeout field of the configuration to the provided value.