MCPcopy
hub / github.com/etcd-io/etcd / SetEndpoints

Method SetEndpoints

client/v3/client.go:178–184  ·  view source on GitHub ↗

SetEndpoints updates client's endpoints.

(eps ...string)

Source from the content-addressed store, hash-verified

176
177// SetEndpoints updates client's endpoints.
178func (c *Client) SetEndpoints(eps ...string) {
179 c.epMu.Lock()
180 defer c.epMu.Unlock()
181 c.endpoints = eps
182
183 c.resolver.SetEndpoints(eps)
184}
185
186// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
187func (c *Client) Sync(ctx context.Context) error {

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
SetEndpointsMethod · 0.65