elastic / elasticsearch-rs

Official Elasticsearch Rust Client
https://www.elastic.co/guide/en/elasticsearch/client/rust-api/current/index.html
Apache License 2.0
695 stars 71 forks source link

Add support for global and per call request timeouts #132

Closed russcam closed 3 years ago

russcam commented 3 years ago

This commit adds the ability to support a global request timeout on TransportBuilder, as well as per request timeouts on builder structs.

Closes #116

russcam commented 3 years ago

With this change, the Transport send function now accepts a per request timeout. Since this function is now taking six parameters, it'd make sense to refactor these into a type in 7.10.0, e.g. Request, with From implementations from builder structs.