24 releases (breaking)

0.20.0 Dec 31, 2024
0.19.0 Sep 29, 2024
0.18.0 Aug 31, 2024
0.16.0 May 8, 2024
0.6.0 Oct 30, 2022

#1981 in Web programming

Download history 40/week @ 2024-09-18 180/week @ 2024-09-25 44/week @ 2024-10-02 20/week @ 2024-10-09 67/week @ 2024-10-16 14/week @ 2024-10-23 29/week @ 2024-10-30 9/week @ 2024-11-06 8/week @ 2024-11-13 10/week @ 2024-11-20 2/week @ 2024-11-27 64/week @ 2024-12-04 65/week @ 2024-12-11 109/week @ 2024-12-25 70/week @ 2025-01-01

281 downloads per month

Apache-2.0

22KB
534 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

~35MB
~565K SLoC