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, client *client.Client) (res *cniTypesVer.Result, err error) // Delete is called on CNI DELETE. It is given the plugin context from // the previous plugin. Delete(ctx context.Context, pluginContext PluginContext, delClient *lib.DeletionFallbackClient) (err error) // 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, client *client.Client) 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.