Documentation ¶
Overview ¶
Package linux implements the Linux plugin that handles management of Linux VETH interfaces.
Index ¶
- type API
- type Config
- type DataResyncReq
- type Deps
- type Option
- type Plugin
- func (plugin *Plugin) Close() error
- func (plugin *Plugin) GetLinuxARPIndexes() l3idx.LinuxARPIndex
- func (plugin *Plugin) GetLinuxIfIndexes() ifaceidx.LinuxIfIndex
- func (plugin *Plugin) GetLinuxRouteIndexes() l3idx.LinuxRouteIndex
- func (plugin *Plugin) GetNamespaceHandler() nsplugin.NamespaceAPI
- func (plugin *Plugin) Init() error
- func (plugin *Plugin) InjectVppIfIndexes(indexes ifaceVPP.SwIfIndex)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // GetLinuxIfIndexes gives access to mapping of logical names (used in ETCD configuration) // to corresponding Linux interface indexes. This mapping is especially helpful // for plugins that need to watch for newly added or deleted Linux interfaces. GetLinuxIfIndexes() ifaceidx.LinuxIfIndex // GetLinuxIfIndexes gives access to mapping of logical names (used in ETCD configuration) to corresponding Linux // ARP entry indexes. This mapping is especially helpful for plugins that need to watch for newly added or deleted // Linux ARP entries. GetLinuxARPIndexes() l3idx.LinuxARPIndex // GetLinuxIfIndexes gives access to mapping of logical names (used in ETCD configuration) to corresponding Linux // route indexes. This mapping is especially helpful for plugins that need to watch for newly added or deleted // Linux routes. GetLinuxRouteIndexes() l3idx.LinuxRouteIndex // GetNamespaceHandler gives access to namespace API which allows plugins to manipulate with linux namespaces GetNamespaceHandler() nsplugin.NamespaceAPI }
API of Linux Plugin
type DataResyncReq ¶
type DataResyncReq struct { // Interfaces is a list af all interfaces that are expected to be in Linux after RESYNC. Interfaces []*interfaces.LinuxInterfaces_Interface // ARPs is a list af all arp entries that are expected to be in Linux after RESYNC. ARPs []*l3.LinuxStaticArpEntries_ArpEntry // Routes is a list af all routes that are expected to be in Linux after RESYNC. Routes []*l3.LinuxStaticRoutes_Route }
DataResyncReq is used to transfer expected configuration of the Linux network stack to the plugins.
func NewDataResyncReq ¶
func NewDataResyncReq() *DataResyncReq
NewDataResyncReq is a constructor of object requirements which are expected to be re-synced.
type Deps ¶
type Deps struct { infra.PluginDeps StatusCheck statuscheck.PluginStatusWriter ServiceLabel servicelabel.ReaderAPI Watcher datasync.KeyValProtoWatcher // injected VPP *vpp.Plugin WatchEventsMutex *sync.Mutex }
Deps groups injected dependencies of plugin so that they do not mix with other plugin fields.
type Option ¶ added in v1.8.1
type Option func(*Plugin)
Option is a function that acts on a Plugin to inject Dependencies or configuration
type Plugin ¶
type Plugin struct { Deps // contains filtered or unexported fields }
Plugin implements Plugin interface, therefore it can be loaded with other plugins.
func (*Plugin) GetLinuxARPIndexes ¶
func (plugin *Plugin) GetLinuxARPIndexes() l3idx.LinuxARPIndex
GetLinuxARPIndexes gives access to mapping of logical names (used in ETCD configuration) to corresponding Linux ARP entry indexes.
func (*Plugin) GetLinuxIfIndexes ¶
func (plugin *Plugin) GetLinuxIfIndexes() ifaceidx.LinuxIfIndex
GetLinuxIfIndexes gives access to mapping of logical names (used in ETCD configuration) interface indexes.
func (*Plugin) GetLinuxRouteIndexes ¶
func (plugin *Plugin) GetLinuxRouteIndexes() l3idx.LinuxRouteIndex
GetLinuxRouteIndexes gives access to mapping of logical names (used in ETCD configuration) to corresponding Linux route indexes.
func (*Plugin) GetNamespaceHandler ¶ added in v1.8.1
func (plugin *Plugin) GetNamespaceHandler() nsplugin.NamespaceAPI
GetNamespaceHandler gives access to namespace API which allows plugins to manipulate with linux namespaces
func (*Plugin) InjectVppIfIndexes ¶
InjectVppIfIndexes injects VPP interfaces mapping into Linux plugin
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
ifaceidx
Package ifaceidx implements name-to-index mapping registry and cache for Linux interfaces.
|
Package ifaceidx implements name-to-index mapping registry and cache for Linux interfaces. |
linuxcalls
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or Linux interfaces in general.
|
Package linuxcalls contains wrappers over Netlink APIs related to Linux VETH interfaces or Linux interfaces in general. |
l3idx
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
|
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes. |
Package model defines the linuxplugin's northbound API.
|
Package model defines the linuxplugin's northbound API. |