package skel

import "github.com/containernetworking/cni/pkg/skel"

Package skel provides skeleton code for a CNI plugin. In particular, it implements argument parsing and validation.

Index

Functions

func PluginMain

func PluginMain(cmdAdd, cmdDel func(_ *CmdArgs) error)

PluginMain is the "main" for a plugin. It accepts two callback functions for add and del commands.

Types

type CmdArgs

type CmdArgs struct {
	ContainerID string
	Netns       string
	IfName      string
	Args        string
	Path        string
	StdinData   []byte
}

CmdArgs captures all the arguments passed in to the plugin via both env vars and stdin

Source Files

skel.go

Version
v0.2.0-rc1
Published
Apr 22, 2016
Platform
js/wasm
Imports
5 packages
Last checked
2 days ago

Tools for package owners.