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

Function WithNewTLSConfigFunc

config/http_config.go:532–536  ·  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

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

Callers

nothing calls this directly

Calls 1

httpClientOptionFuncFuncType · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…