etcdv3 / etcd-client

An etcd v3 API client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature request] Add ability to set connect timeout to client

joshua-sp opened this issue · comments

Currently we can set the timeout on each request, but it seems that the actual initial connection itself has no timeout, which can lead to hanging if an endpoint is down.

Adding this would probably be a matter of adding a new field to ConnectOptions to expose tonic::transport's connect_timeout method

@joshua-sp The PR #47 add a new API ConnectOptions::with_connect_timeout() which can be used to set connect_timeout, please review if it meets your requirement.

Looks good to me, thanks a lot David!