http

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const HeaderColdStart = "X-KEDA-HTTP-Cold-Start"

HeaderColdStart is the response header that indicates whether a cold start occurred.

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

ServeContext creates a TCP listener on addr and serves HTTP(S) requests until ctx is cancelled.

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