Skip to content

Commit

Permalink
Add InfoResponse structure (#187)
Browse files Browse the repository at this point in the history
Signed-off-by: samuel orji <awesomeorji@gmail.com>
  • Loading branch information
samuelorji authored Oct 11, 2023
1 parent 5c5a52d commit 94e7b72
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]

### Added

- Added InfoResponse structure ([#187](https://github.com/opensearch-project/opensearch-rs/pull/187))
### Dependencies
- Bumps `sysinfo` from 0.28.0 to 0.29.0
- Bumps `serde_with` from ~2 to ~3
Expand Down
1 change: 1 addition & 0 deletions opensearch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ mod readme {
pub mod auth;
pub mod cert;
pub mod http;
pub mod models;
pub mod params;

// GENERATED-BEGIN:namespace-modules
Expand Down
25 changes: 25 additions & 0 deletions opensearch/src/models/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
use serde::Deserialize;

#[derive(Deserialize, Debug)]
#[doc = "Cluster information"]
pub struct InfoResponse {
name: String,
cluster_name: String,
cluster_uuid: String,
version: OpenSearchVersionInfo,
#[serde(rename = "tagline")]
tag_line: String,
}

#[derive(Deserialize, Debug)]
pub struct OpenSearchVersionInfo {
distribution: String,
number: String,
build_type: String,
build_hash: String,
build_date: String,
build_snapshot: bool,
lucene_version: String,
minimum_wire_compatibility_version: String,
minimum_index_compatibility_version: String,
}

0 comments on commit 94e7b72

Please sign in to comment.