MCPcopy
hub / github.com/elastic/go-elasticsearch / WithCloudID

Function WithCloudID

options.go:65–70  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

63//
64// It is an error to set both WithCloudID and WithAddresses.
65func 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.
73func WithDiscoverNodesOnStart() Option {

Callers 5

TestNew_WithCloudIDFunction · 0.85
TestNew_InvalidCloudIDFunction · 0.85
TestClientConfigurationFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestNew_WithCloudIDFunction · 0.68
TestNew_InvalidCloudIDFunction · 0.68
TestClientConfigurationFunction · 0.68