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

Method UnmarshalYAML

config/http_config.go:465–472  ·  view source on GitHub ↗

UnmarshalYAML implements the yaml.Unmarshaler interface.

(unmarshal func(any) error)

Source from the content-addressed store, hash-verified

463
464// UnmarshalYAML implements the yaml.Unmarshaler interface.
465func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(any) error) error {
466 type plain HTTPClientConfig
467 *c = DefaultHTTPClientConfig
468 if err := unmarshal((*plain)(c)); err != nil {
469 return err
470 }
471 return c.Validate()
472}
473
474// UnmarshalJSON implements the json.Marshaler interface for URL.
475func (c *HTTPClientConfig) UnmarshalJSON(data []byte) error {

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected