discovery/triton/triton.go
func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
	*c = DefaultSDConfig
	type plain SDConfig
	err := unmarshal((*plain)(c))
	if err != nil {
		return err
	}
	if c.Account == "" {
		return errors.New("triton SD configuration requires an account")
	}
	if c.DNSSuffix == "" {
		return errors.New("triton SD configuration requires a dns_suffix")
	}
	if c.Endpoint == "" {
		return errors.New("triton SD configuration requires an endpoint")
	}
	if c.RefreshInterval <= 0 {
		return errors.New("triton SD configuration requires RefreshInterval to be a positive integer")
	}
	return nil
}
func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
	*c = DefaultSDConfig
	type plain SDConfig
	err := unmarshal((*plain)(c))
	if err != nil {
		return err
	}
	if c.Account == "" {
		return errors.New("triton SD configuration requires an account")
	}
	if c.DNSSuffix == "" {
		return errors.New("triton SD configuration requires a dns_suffix")
	}
	if c.Endpoint == "" {
		return errors.New("triton SD configuration requires an endpoint")
	}
	if c.RefreshInterval <= 0 {
		return errors.New("triton SD configuration requires RefreshInterval to be a positive integer")
	}
	return nil
}
func ( c * SDConfig ) UnmarshalYAML ( unmarshal func ( interface { } ) error ) error { * c = DefaultSDConfig type plain SDConfig err := unmarshal ( ( * plain ) ( c ) ) if err != nil { return err } if c . Account == " " { return errors . New ( " " ) } if c . DNSSuffix == " " { return errors . New ( " " ) } if c . Endpoint == " " { return errors . New ( " " ) } if c . RefreshInterval <= 0 { return errors . New ( " " ) } return nil }
// UnmarshalYAML implements the yaml.Unmarshaler interface.
UnmarshalYAML implements the yaml . Unmarshaler interface .