Skip to content

Commit

Permalink
*: add auto sync configuration in creating etcd client (#1240) (#1241)
Browse files Browse the repository at this point in the history
close #1236
  • Loading branch information
ti-chi-bot authored Jun 26, 2023
1 parent a7c0fcd commit 5b001e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ func NewClient(cli *clientv3.Client, root string) *Client {
// NewClientFromCfg returns a wrapped etcd client
func NewClientFromCfg(endpoints []string, dialTimeout time.Duration, root string, security *tls.Config) (*Client, error) {
cli, err := clientv3.New(clientv3.Config{
Endpoints: endpoints,
DialTimeout: dialTimeout,
TLS: security,
Endpoints: endpoints,
DialTimeout: dialTimeout,
TLS: security,
AutoSyncInterval: 30 * time.Second,
})
if err != nil {
return nil, errors.Trace(err)
Expand Down

0 comments on commit 5b001e5

Please sign in to comment.