Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TransportPool ¶
type TransportPool struct { }
TransportPool is a progressive and non-blocking pool for http.Transport objects, optimised for Gargabe Collection and without a hard limit on number of objects created.
Its main purpose is to enable for transport objects to be used across helm chart download requests and helm/pkg/getter instances by leveraging the getter.WithTransport(t) construct.
The use of this pool improves the default behaviour of helm getter which creates a new connection per request, or per getter instance, resulting on unnecessary TCP connections with the target.
http.Transport objects may contain sensitive material and also have settings that may impact the security of HTTP operations using them (i.e. InsecureSkipVerify). Therefore, ensure that they are used in a thread-safe way, and also by reseting TLS specific state after each use.
Calling the Release(t) function will reset TLS specific state whilst also releasing the transport back to the pool to be reused.
xref: https://github.com/helm/helm/pull/10568 xref2: https://github.com/fluxcd/source-controller/issues/578