mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-03-05 21:00:12 -08:00
Revert "Expose the function to generate tls.Config"
This reverts commit bd0918f29a
.
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
This commit is contained in:
parent
fa4edd700e
commit
7ef21b8bba
|
@ -45,11 +45,10 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return ConfigToTLSConfig(&c.TLSConfig)
|
return configToTLSConfig(&c.TLSConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
|
func configToTLSConfig(c *TLSStruct) (*tls.Config, error) {
|
||||||
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
|
|
||||||
cfg := &tls.Config{}
|
cfg := &tls.Config{}
|
||||||
if len(c.TLSCertPath) == 0 {
|
if len(c.TLSCertPath) == 0 {
|
||||||
return nil, errors.New("missing TLSCertPath")
|
return nil, errors.New("missing TLSCertPath")
|
||||||
|
|
Loading…
Reference in a new issue