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

Method UnmarshalYAML

config/http_config.go:398–405  ·  view source on GitHub ↗

UnmarshalYAML implements the yaml.Unmarshaler interface

(unmarshal func(interface{}) error)

Source from the content-addressed store, hash-verified

396
397// UnmarshalYAML implements the yaml.Unmarshaler interface
398func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
399 type plain HTTPClientConfig
400 *c = DefaultHTTPClientConfig
401 if err := unmarshal((*plain)(c)); err != nil {
402 return err
403 }
404 return c.Validate()
405}
406
407// UnmarshalJSON implements the json.Marshaler interface for URL.
408func (c *HTTPClientConfig) UnmarshalJSON(data []byte) error {

Callers

nothing calls this directly

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected