Crates.io | k8s-metrics |
lib.rs | k8s-metrics |
version | |
source | src |
created_at | 2022-10-09 12:46:38.827849 |
updated_at | 2024-09-29 12:38:41.902611 |
description | K8s Metrics API Resource definitions |
homepage | |
repository | https://github.com/imp/k8s-metrics-rs |
max_upload_size | |
id | 683997 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Portions of the code are copied from other projects, like kdash
use k8s_metrics::v1beta1 as metricsv1;
use kube::api;
async fn pod_metrics(client: &kube::Client, namespace: &str) -> kube::Result<Vec<metricsv1::PodMetrics>> {
let lp = api::ListParams::default();
api::Api::<metricsv1::PodMetrics>::namespaced(client.clone(), namespace)
.list(&lp)
.await
.map(|list| list.items)
}