WithCloudID configures the client for Elastic Cloud using the given Cloud ID. See https://www.elastic.co/guide/en/cloud/current/ec-cloud-id.html. It is an error to set both WithCloudID and WithAddresses.
(cloudID string)
| 63 | // |
| 64 | // It is an error to set both WithCloudID and WithAddresses. |
| 65 | func WithCloudID(cloudID string) Option { |
| 66 | return Option{apply: func(o *clientOptions) error { |
| 67 | o.cloudID = cloudID |
| 68 | return nil |
| 69 | }} |
| 70 | } |
| 71 | |
| 72 | // WithDiscoverNodesOnStart triggers node discovery when the client is created. |
| 73 | func WithDiscoverNodesOnStart() Option { |
no outgoing calls