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

Method UnmarshalYAML

config/http_config.go:467–474  ·  view source on GitHub ↗

UnmarshalYAML implements the yaml.Unmarshaler interface.

(unmarshal func(any) error)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected