httpclient

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelFunc

type CancelFunc func()

type Pool

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

func NewPool

func NewPool(ctx context.Context, cfg *config.Config, creator func() *http.Client) *Pool

func (*Pool) Busy

func (p *Pool) Busy() int64

func (*Pool) Close

func (p *Pool) Close() error

func (*Pool) Do

func (p *Pool) Do(req *http.Request) (*http.Response, error)

func (*Pool) OnReq

func (p *Pool) OnReq(middlewares ...middleware.RequestMiddlewareFunc) Pooled

func (*Pool) OnResp

func (p *Pool) OnResp(middlewares ...middleware.ResponseMiddlewareFunc) Pooled

func (*Pool) OutOfPool

func (p *Pool) OutOfPool() int64

func (*Pool) Total

func (p *Pool) Total() int64

type Pooled

type Pooled interface {
	Do(req *http.Request) (*http.Response, error)
	OnReq(middlewares ...httpclientmiddleware.RequestMiddlewareFunc) Pooled
	OnResp(middlewares ...httpclientmiddleware.ResponseMiddlewareFunc) Pooled

	Busy() int64
	Total() int64
	OutOfPool() int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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