MCPcopy Create free account
hub / github.com/prometheus/common / WithNewTLSConfigFunc

Function WithNewTLSConfigFunc

config/http_config.go:530–534  ·  view source on GitHub ↗

WithNewTLSConfigFunc allows you to override the func that creates the TLS config from the prometheus http config. The default is `NewTLSConfigWithContext`.

(newTLSConfigFunc NewTLSConfigFunc)

Source from the content-addressed store, hash-verified

528// from the prometheus http config.
529// The default is `NewTLSConfigWithContext`.
530func WithNewTLSConfigFunc(newTLSConfigFunc NewTLSConfigFunc) HTTPClientOption {
531 return httpClientOptionFunc(func(opts *httpClientOptions) {
532 opts.newTLSConfigFunc = newTLSConfigFunc
533 })
534}
535
536// WithKeepAlivesDisabled allows to disable HTTP keepalive.
537func WithKeepAlivesDisabled() HTTPClientOption {

Callers

nothing calls this directly

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by

no test coverage detected