Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultConfigName is the name used by default in the standard CNI // configuration DefaultConfigName = "cilium" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, p ChainingPlugin) error
Register is called by chaining plugins to register themselves. After Register(), the plugin can be found with Lookup().
Types ¶
type ChainingPlugin ¶
type ChainingPlugin interface { // Add is called on CNI ADD. It is given the plugin context from the // previous plugin. It must return a CNI result or an error. Add(ctx context.Context, pluginContext PluginContext) (res *cniTypesVer.Result, err error) // ImplementsAdd returns true if the chaining plugin implements its own // add logic ImplementsAdd() bool // Delete is called on CNI DELETE. It is given the plugin context from // the previous plugin. Delete(ctx context.Context, pluginContext PluginContext) (err error) // ImplementsDelete returns true if the chaining plugin implements its // own delete logic ImplementsDelete() bool // Check is called on CNI CHECK. The plugin should verify (to the best of its // ability) that everything is reasonably configured, else return error. Check(ctx context.Context, pluginContext PluginContext) error }
ChainingPlugin is the interface each chaining plugin must implement
func Lookup ¶
func Lookup(name string) ChainingPlugin
Lookup searches for a chaining plugin with a given name and returns it
Click to show internal directories.
Click to hide internal directories.