SetEndpoints updates client's endpoints.
(eps ...string)
| 176 | |
| 177 | // SetEndpoints updates client's endpoints. |
| 178 | func (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. |
| 187 | func (c *Client) Sync(ctx context.Context) error { |