diff options
author | Colvin Wellborn <39858617+colvin@users.noreply.github.com> | 2019-12-26 22:15:06 -0500 |
---|---|---|
committer | Doug Tangren <d.tangren@gmail.com> | 2019-12-26 22:15:06 -0500 |
commit | 3580c29b349585ae7de500ccb510659e9caf1500 (patch) | |
tree | faf62cb787674526ff1125b0929ac61f60fd8016 /src | |
parent | 6e4fe40ff249a158cfac33e840f6103a2478d3e4 (diff) |
Expand rep::Version (#212)
* expand the fields of Version
Expands `shiplift::rep::Version` to contain fields for the following
elements of the `/version` API:
- `min_api_version` (`MinAPIVersion`)
- `os` (`Os`)
- `arch` (`Arch`)
- `kernel_version` (`KernelVersion`)
- `build_time` (`BuildTime`)
Adds a new example program to display version information.
* order version fields according to api docs
* remove min_api_version
For backwards compat with older engines, remove the `min_api_version`
field. It was apparently added in API version `1.25.0` (circa 2017).
Diffstat (limited to 'src')
-rw-r--r-- | src/rep.rs | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -404,10 +404,17 @@ pub struct Top { #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct Version { - pub api_version: String, pub version: String, + pub api_version: String, pub git_commit: String, pub go_version: String, + pub os: String, + pub arch: String, + pub kernel_version: String, + #[cfg(feature = "chrono")] + pub build_time: DateTime<Utc>, + #[cfg(not(feature = "chrono"))] + pub build_time: String, } #[derive(Clone, Debug, Serialize, Deserialize)] |