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

Function NewTLSConfig

config/http_config.go:1258–1260  ·  view source on GitHub ↗

NewTLSConfig creates a new tls.Config from the given TLSConfig.

(cfg *TLSConfig, optFuncs ...TLSConfigOption)

Source from the content-addressed store, hash-verified

1256
1257// NewTLSConfig creates a new tls.Config from the given TLSConfig.
1258func NewTLSConfig(cfg *TLSConfig, optFuncs ...TLSConfigOption) (*tls.Config, error) {
1259 return NewTLSConfigWithContext(context.Background(), cfg, optFuncs...)
1260}
1261
1262// NewTLSConfigWithContext creates a new tls.Config from the given TLSConfig.
1263func NewTLSConfigWithContext(ctx context.Context, cfg *TLSConfig, optFuncs ...TLSConfigOption) (*tls.Config, error) {

Callers 5

TestTLSConfigFunction · 0.85
TestTLSConfigEmptyFunction · 0.85
TestTLSConfigInvalidCAFunction · 0.85
newOauth2TokenSourceMethod · 0.85
LoadTLSConfigFunction · 0.85

Calls 1

NewTLSConfigWithContextFunction · 0.85

Tested by 4

TestTLSConfigFunction · 0.68
TestTLSConfigEmptyFunction · 0.68
TestTLSConfigInvalidCAFunction · 0.68
LoadTLSConfigFunction · 0.68