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

Struct TLSConfig

config/http_config.go:1324–1354  ·  view source on GitHub ↗

TLSConfig configures the options for TLS connections.

Source from the content-addressed store, hash-verified

1322
1323// TLSConfig configures the options for TLS connections.
1324type TLSConfig struct {
1325 // Text of the CA cert to use for the targets.
1326 CA string `yaml:"ca,omitempty" json:"ca,omitempty"`
1327 // Text of the client cert file for the targets.
1328 Cert string `yaml:"cert,omitempty" json:"cert,omitempty"`
1329 // Text of the client key file for the targets.
1330 Key Secret `yaml:"key,omitempty" json:"key,omitempty"`
1331 // The CA cert to use for the targets.
1332 CAFile string `yaml:"ca_file,omitempty" json:"ca_file,omitempty"`
1333 // The client cert file for the targets.
1334 CertFile string `yaml:"cert_file,omitempty" json:"cert_file,omitempty"`
1335 // The client key file for the targets.
1336 KeyFile string `yaml:"key_file,omitempty" json:"key_file,omitempty"`
1337 // CARef is the name of the secret within the secret manager to use as the CA cert for the
1338 // targets.
1339 CARef string `yaml:"ca_ref,omitempty" json:"ca_ref,omitempty"`
1340 // CertRef is the name of the secret within the secret manager to use as the client cert for
1341 // the targets.
1342 CertRef string `yaml:"cert_ref,omitempty" json:"cert_ref,omitempty"`
1343 // KeyRef is the name of the secret within the secret manager to use as the client key for
1344 // the targets.
1345 KeyRef string `yaml:"key_ref,omitempty" json:"key_ref,omitempty"`
1346 // Used to verify the hostname for the targets.
1347 ServerName string `yaml:"server_name,omitempty" json:"server_name,omitempty"`
1348 // Disable target certificate validation.
1349 InsecureSkipVerify bool `yaml:"insecure_skip_verify" json:"insecure_skip_verify"`
1350 // Minimum TLS version.
1351 MinVersion TLSVersion `yaml:"min_version,omitempty" json:"min_version,omitempty"`
1352 // Maximum TLS version.
1353 MaxVersion TLSVersion `yaml:"max_version,omitempty" json:"max_version,omitempty"`
1354}
1355
1356// SetDirectory joins any relative file paths with dir.
1357func (c *TLSConfig) SetDirectory(dir string) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected