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

Function LoadHTTPConfig

config/http_config.go:309–316  ·  view source on GitHub ↗

LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.

(s string)

Source from the content-addressed store, hash-verified

307
308// LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
309func LoadHTTPConfig(s string) (*HTTPClientConfig, error) {
310 cfg := &HTTPClientConfig{}
311 err := yaml.UnmarshalStrict([]byte(s), cfg)
312 if err != nil {
313 return nil, err
314 }
315 return cfg, nil
316}
317
318// LoadHTTPConfigFile parses the given YAML file into a HTTPClientConfig.
319func LoadHTTPConfigFile(filename string) (*HTTPClientConfig, []byte, error) {

Callers 1

LoadHTTPConfigFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…