shimkit 0.3.1

Opinionated library for building containerd shims
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use anyhow::Result;
use containerd_shim::util::convert_to_any;
use oci_spec::runtime;
use protobuf::well_known_types::any::Any;

pub fn get_metrics(pid: u32) -> Result<Any> {
    // Create empty message for now
    // https://github.com/containerd/rust-extensions/pull/178
    let m = protobuf::well_known_types::any::Any::new();

    let metrics = convert_to_any(Box::new(m))?;
    Ok(metrics)
}