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

Method SetDirectory

config/http_config.go:1359–1366  ·  view source on GitHub ↗

SetDirectory joins any relative file paths with dir.

(dir string)

Source from the content-addressed store, hash-verified

1357
1358// SetDirectory joins any relative file paths with dir.
1359func (c *TLSConfig) SetDirectory(dir string) {
1360 if c == nil {
1361 return
1362 }
1363 c.CAFile = JoinDir(dir, c.CAFile)
1364 c.CertFile = JoinDir(dir, c.CertFile)
1365 c.KeyFile = JoinDir(dir, c.KeyFile)
1366}
1367
1368// UnmarshalYAML implements the yaml.Unmarshaler interface.
1369func (c *TLSConfig) UnmarshalYAML(unmarshal func(any) error) error {

Callers

nothing calls this directly

Calls 1

JoinDirFunction · 0.85

Tested by

no test coverage detected