--- Client-level options --------------------------------------------------- WithAddresses sets the Elasticsearch node addresses. Multiple addresses enable round-robin load balancing and failover. If neither WithAddresses nor WithCloudID is used, the client falls back to the ELASTICSEARCH_URL envir
(addrs ...string)
| 52 | // If neither WithAddresses nor WithCloudID is used, the client falls back to |
| 53 | // the ELASTICSEARCH_URL environment variable, then to http://localhost:9200. |
| 54 | func WithAddresses(addrs ...string) Option { |
| 55 | return Option{apply: func(o *clientOptions) error { |
| 56 | o.addresses = append(o.addresses, addrs...) |
| 57 | return nil |
| 58 | }} |
| 59 | } |
| 60 | |
| 61 | // WithCloudID configures the client for Elastic Cloud using the given Cloud ID. |
| 62 | // See https://www.elastic.co/guide/en/cloud/current/ec-cloud-id.html. |
no outgoing calls