package
Version:
v1.4.1
Opens a new window with list of versions in this module.
Published: Jun 11, 2018
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Flavors
A flavor is a reusable collection of plugins. It allows inspecting
capabilities available to an agent. By convention, a Flavor should
provide:
- a method called
Inject()
, which should wire the flavor's plugins
together and to their external dependencies (typically via dependency
injection.
- a method called
Plugins()
, which should return all plugins contained
in the Flavor, including plugins contained in reused Flavors.
Example:
type MyFlavor struct {
injected bool
Aplugin a.Plugin
Bplugin b.Plugin
Cplugin c.Plugin
}
func (f *MyFlavor) Inject() bool {
if f.injected {
return false
}
f.injected = true
f.Bplugin.A = &f.Aplugin
f.Cplugin.B = &f.Bplugin
return true
}
func (f *MyFlavor) Plugins() []*core.NamedPlugin {
f.Inject()
return core.ListPluginsInFlavor(f)
}
Documentation
¶
Package flavors contains predefined vpp-agent flavors.
Source Files
¶
Directories
¶
Package local defines flavor used for VPP agents managed only locally.
|
Package local defines flavor used for VPP agents managed only locally. |
Package vpp defines the standard flavor used for full-featured VPP agents.
|
Package vpp defines the standard flavor used for full-featured VPP agents. |
Click to show internal directories.
Click to hide internal directories.