Skip to content

Commit

Permalink
Generate code for 8.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
swallez committed Nov 18, 2024
1 parent e6e2f02 commit eaa3b95
Show file tree
Hide file tree
Showing 13 changed files with 1,159 additions and 72 deletions.
18 changes: 9 additions & 9 deletions elasticsearch/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2457,9 +2457,9 @@ pub struct ClusterStats<'a, 'b> {
parts: ClusterStatsParts<'b>,
error_trace: Option<bool>,
filter_path: Option<&'b [&'b str]>,
flat_settings: Option<bool>,
headers: HeaderMap,
human: Option<bool>,
include_remotes: Option<bool>,
pretty: Option<bool>,
request_timeout: Option<Duration>,
source: Option<&'b str>,
Expand All @@ -2475,8 +2475,8 @@ impl<'a, 'b> ClusterStats<'a, 'b> {
headers,
error_trace: None,
filter_path: None,
flat_settings: None,
human: None,
include_remotes: None,
pretty: None,
request_timeout: None,
source: None,
Expand All @@ -2493,11 +2493,6 @@ impl<'a, 'b> ClusterStats<'a, 'b> {
self.filter_path = Some(filter_path);
self
}
#[doc = "Return settings in flat format (default: false)"]
pub fn flat_settings(mut self, flat_settings: bool) -> Self {
self.flat_settings = Some(flat_settings);
self
}
#[doc = "Adds a HTTP header"]
pub fn header(mut self, key: HeaderName, value: HeaderValue) -> Self {
self.headers.insert(key, value);
Expand All @@ -2508,6 +2503,11 @@ impl<'a, 'b> ClusterStats<'a, 'b> {
self.human = Some(human);
self
}
#[doc = "Include remote cluster data into the response (default: false)"]
pub fn include_remotes(mut self, include_remotes: bool) -> Self {
self.include_remotes = Some(include_remotes);
self
}
#[doc = "Pretty format the returned JSON response."]
pub fn pretty(mut self, pretty: bool) -> Self {
self.pretty = Some(pretty);
Expand Down Expand Up @@ -2541,17 +2541,17 @@ impl<'a, 'b> ClusterStats<'a, 'b> {
error_trace: Option<bool>,
#[serde(serialize_with = "crate::client::serialize_coll_qs")]
filter_path: Option<&'b [&'b str]>,
flat_settings: Option<bool>,
human: Option<bool>,
include_remotes: Option<bool>,
pretty: Option<bool>,
source: Option<&'b str>,
timeout: Option<&'b str>,
}
let query_params = QueryParams {
error_trace: self.error_trace,
filter_path: self.filter_path,
flat_settings: self.flat_settings,
human: self.human,
include_remotes: self.include_remotes,
pretty: self.pretty,
source: self.source,
timeout: self.timeout,
Expand Down
28 changes: 16 additions & 12 deletions elasticsearch/src/http/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
*/
//! HTTP transport and connection components
#[cfg(all(target_arch = "wasm32", any(feature = "native-tls", feature = "rustls-tls")))]
#[cfg(all(
target_arch = "wasm32",
any(feature = "native-tls", feature = "rustls-tls")
))]
compile_error!("TLS features are not compatible with the wasm target");

#[cfg(any(feature = "native-tls", feature = "rustls-tls"))]
Expand Down Expand Up @@ -481,8 +484,7 @@ impl Transport {
headers: HeaderMap,
query_string: Option<&Q>,
body: Option<B>,
#[allow(unused_variables)]
timeout: Option<Duration>,
#[allow(unused_variables)] timeout: Option<Duration>,
) -> Result<reqwest::RequestBuilder, Error>
where
B: Body,
Expand Down Expand Up @@ -589,15 +591,17 @@ impl Transport {
let connection = self.conn_pool.next();

// Build node info request
let node_request = self.request_builder(
&connection,
Method::Get,
"_nodes/http?filter_path=nodes.*.http",
HeaderMap::default(),
None::<&()>,
None::<()>,
None,
).unwrap();
let node_request = self
.request_builder(
&connection,
Method::Get,
"_nodes/http?filter_path=nodes.*.http",
HeaderMap::default(),
None::<&()>,
None::<()>,
None,
)
.unwrap();

let scheme = connection.url.scheme();
let resp = node_request.send().await.unwrap();
Expand Down
Loading

0 comments on commit eaa3b95

Please sign in to comment.