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

Function NewTLSConfig

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

1258
1259// NewTLSConfig creates a new tls.Config from the given TLSConfig.
1260func NewTLSConfig(cfg *TLSConfig, optFuncs ...TLSConfigOption) (*tls.Config, error) {
1261 return NewTLSConfigWithContext(context.Background(), cfg, optFuncs...)
1262}
1263
1264// NewTLSConfigWithContext creates a new tls.Config from the given TLSConfig.
1265func 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…