Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTTFBTimeout is the timeout used in the meteredRoundTripper // when calling http.Transport.RoundTrip. The request will be cancelled // if the response takes longer than this. DefaultTTFBTimeout = 15 * time.Second )
Variables ¶
View Source
var (
// InternalTransport can be used with http.Client with TLS and certificates
InternalTransport = newInternalTransport()
)
Functions ¶
func NewTransportWithMetrics ¶ added in v1.16.0
func NewTransportWithMetrics(name string, tracerVec, durationsVec *prometheus. HistogramVec, counterVec *prometheus.CounterVec, ttfbTimeout time.Duration) http.RoundTripper
NewTransportWithMetrics will create a custom http.RoundTripper that can be used with an http.Client. The RoundTripper will report metrics based on the collectors passed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.