Crate cni_plugin[−][src]
Library to write CNI plugins.
- CNI information: on the cni.dev website.
- Tooling overview
- Tutorial
Quick start
use cni_plugin::{Cni, install_logger}; install_logger("hello-world.log"); match Cni::load() { Cni::Add { container_id, ifname, netns, path, config } => {} Cni::Del { container_id, ifname, netns, path, config } => {} Cni::Check { container_id, ifname, netns, path, config } => {} Cni::Version(_) => unreachable!() }
Modules
| config | Configuration structures. |
| delegation | Plugin delegation. |
| error | When CNI goes bad. |
| ip_range | The IpRange type and helpers for IP pools. |
| logger | The standard logger and utilities. |
| macaddr | MAC address (de)serialisation. |
| reply | Reply types and helpers. |
Structs
| Inputs | An alternate representation of plugin inputs. |
Enums
| Cni | The main entrypoint to this plugin and the enum which contains plugin input. |
| Command | Identifies the command given to a plugin. |