Crate rscni

Source
Expand description

RsCNI is a CNI plugin library for Rust. RsCNI has a similar APIs to containernetworking/cni/pkg/skel. The entrypoint is Plugin. It accepts callback functions defined as CmdFn to represent CNI Add, Del and Check commands.

Please see rscni-debug for the example implementation. To use async version of rscni, please use it with feature=async flag. The usage of async version, see async-rscni-debug.

§Quick start

fn main() {
    let version_info = PluginInfo::default();
    let mut dispatcher = Plugin::new(add, del, check, version_info, ABOUT_MSG);

    dispatcher.run().expect("Failed to complete the CNI call");
}

Modules§

async_skel
error
skel
types
version