23 releases (breaking)

0.19.0 Sep 29, 2024
0.17.2 Aug 31, 2024
0.16.0 May 8, 2024
0.15.0 Jan 23, 2024
0.6.0 Oct 30, 2022

#1744 in Web programming

Download history 6/week @ 2024-07-21 54/week @ 2024-07-28 9/week @ 2024-08-04 52/week @ 2024-08-11 6/week @ 2024-08-18 348/week @ 2024-08-25 190/week @ 2024-09-01 2/week @ 2024-09-08 103/week @ 2024-09-15 42/week @ 2024-09-22 189/week @ 2024-09-29 27/week @ 2024-10-06 25/week @ 2024-10-13 61/week @ 2024-10-20 25/week @ 2024-10-27

142 downloads per month

Apache-2.0

22KB
527 lines

Kubernetes Metrics API Resource definitions

Portions of the code are copied from other projects, like kdash

Usage example

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)
}

Dependencies

~40MB
~640K SLoC