⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

CniPlugin

Trait CniPlugin 

Source
pub trait CniPlugin {
    // Required methods
    fn add(
        &mut self,
        container_id: &str,
        config: &CniConfig,
    ) -> Result<CniResult, CniError>;
    fn del(
        &mut self,
        container_id: &str,
        config: &CniConfig,
    ) -> Result<(), CniError>;
    fn check(
        &self,
        container_id: &str,
        config: &CniConfig,
    ) -> Result<(), CniError>;
    fn version(&self) -> Vec<String>;
}
Expand description

Trait for CNI plugin implementations.

Required Methods§

Source

fn add( &mut self, container_id: &str, config: &CniConfig, ) -> Result<CniResult, CniError>

Add a container to the network.

Source

fn del( &mut self, container_id: &str, config: &CniConfig, ) -> Result<(), CniError>

Remove a container from the network.

Source

fn check(&self, container_id: &str, config: &CniConfig) -> Result<(), CniError>

Check that a container’s networking is correct.

Source

fn version(&self) -> Vec<String>

Return supported CNI versions.

Implementors§