Documentation
¶
Index ¶
Constants ¶
This section is empty.
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
}
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.