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§
Sourcefn add(
&mut self,
container_id: &str,
config: &CniConfig,
) -> Result<CniResult, CniError>
fn add( &mut self, container_id: &str, config: &CniConfig, ) -> Result<CniResult, CniError>
Add a container to the network.
Sourcefn del(
&mut self,
container_id: &str,
config: &CniConfig,
) -> Result<(), CniError>
fn del( &mut self, container_id: &str, config: &CniConfig, ) -> Result<(), CniError>
Remove a container from the network.