xhttp

package
v0.43.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *ClientConfig) (*Client, error)

func (*Client) DoTimeout

func (c *Client) DoTimeout(
	method, contentType string,
	body []byte,
	timeout time.Duration,
	processResponse func([]byte) error,
) (int, error)

type ClientConfig

type ClientConfig struct {
	Endpoints            []string
	ConnectionTimeout    time.Duration
	AuthHeader           string
	GzipCompressionLevel string
	TLS                  *ClientTLSConfig
	KeepAlive            *ClientKeepAliveConfig
}

type ClientKeepAliveConfig

type ClientKeepAliveConfig struct {
	MaxConnDuration     time.Duration
	MaxIdleConnDuration time.Duration
}

type ClientTLSConfig

type ClientTLSConfig struct {
	CACert             string
	InsecureSkipVerify bool
}

Jump to

Keyboard shortcuts

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