http

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestCtx added in v0.2.0

func NewTestCtx(
	method,
	path string,
) (*nethttp.Request, *httptest.ResponseRecorder)

func ServeContext added in v0.2.0

func ServeContext(ctx context.Context, addr string, hdl http.Handler, tlsConfig *tls.Config) error

Types

type TransportPool added in v0.12.0

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

TransportPool manages a pool of nethttp.Transport instances, reusing them based on response header timeout configuration.

NOTE: Transports are never evicted, we expect a low cardinality of timeouts

func NewTransportPool added in v0.12.0

func NewTransportPool(baseTransport *nethttp.Transport) *TransportPool

NewTransportPool creates a new transport pool with a base transport template

func (*TransportPool) Get added in v0.12.0

func (tp *TransportPool) Get(responseHeaderTimeout time.Duration) *nethttp.Transport

Get returns a cached or new transport for the given response header timeout.

Jump to

Keyboard shortcuts

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