http_client

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDialTimeout        = 15
	DefaultDialKeepAlive      = 15
	DefaultMaxIdleConn        = 100
	DefaultIdleConnTimeout    = 15
	DefaultMaxIdleConnPerHost = 100
	DefaultTimeout            = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

type HttpClient struct {
	Client *http.Client
}

func (*HttpClient) Init

func (h *HttpClient) Init(options ...Option)

type Option

type Option func(*Options)

func DialKeepAlive

func DialKeepAlive(dialKeepAlive int) Option

func DialTimeout

func DialTimeout(dialTimeout int) Option

func IdleConnTimeout

func IdleConnTimeout(idleConnTimeout int) Option

func MaxIdleConn

func MaxIdleConn(maxIdleConn int) Option

func MaxIdleConnPerHost

func MaxIdleConnPerHost(maxIdleConnPerHost int) Option

func Timeout

func Timeout(timeout int) Option

type Options

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

Jump to

Keyboard shortcuts

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