in config/configelasticsearch/configclient.go [129:148]
func (cfg *ClientConfig) Validate() error {
endpoints, err := cfg.endpoints()
if err != nil {
return err
}
for _, endpoint := range endpoints {
if err := validateEndpoint(endpoint); err != nil {
return fmt.Errorf("invalid endpoint %q: %w", endpoint, err)
}
}
if cfg.Compression != "none" && cfg.Compression != configcompression.TypeGzip {
return errors.New("compression must be one of [none, gzip]")
}
if cfg.Retry.MaxRetries < 0 {
return errors.New("retry::max_requests should be non-negative")
}
return cfg.ClientConfig.Validate()
}