func (cfg RawConfig) Validate() error {
	if err := cfg.validateHost(); err != nil {
		return errors.Trace(err)
	}

	if cfg.Enabled || cfg.ClientKey != "" || cfg.ClientCert != "" || cfg.CACert != "" {
		if _, err := cfg.tlsConfig(); err != nil {
			return errors.Annotate(err, "validating TLS config")
		}
	}
	return nil
}
// Validate ensures that the config is currently valid.
Validate ensures that the config is currently valid.
// Validate ensures that the config is currently valid .
func (cfg RawConfig) Validate() error {
	if err := cfg.validateHost(); err != nil {
		return errors.Trace(err)
	}
	if cfg.Enabled || cfg.ClientKey != "" || cfg.ClientCert != "" || cfg.CACert != "" {
		if _, err := cfg.tlsConfig(); err != nil {
			return errors.Annotate(err, "validating TLS config")
		}
	}
	return nil
}
func ( cfg RawConfig ) Validate ( ) error { if err := cfg . validateHost ( ) ; err != nil { return errors . Trace ( err ) } if cfg . Enabled || cfg . ClientKey != " " || cfg . ClientCert != " " || cfg . CACert != " " { if _ , err := cfg . tlsConfig ( ) ; err != nil { return errors . Annotate ( err , " " ) } } return nil }
Validate ensures that the config is currently valid.
Validate ensures that the config is currently valid .