Documentation ¶
Overview ¶
Package network contains all rendered network oriented resources for Nimbess
Index ¶
- func MakeGateMap() map[Gate]PipelineModule
- type EgressPort
- type Gate
- type IngressPort
- type L2FIBCommand
- type Module
- func (m *Module) Connect(module PipelineModule, egress bool, gate *Gate) Gate
- func (m *Module) Disconnect(gate Gate, egress bool)
- func (m *Module) GetEGate(module PipelineModule) *Gate
- func (m Module) GetEGateMap() map[Gate]PipelineModule
- func (m *Module) GetIGate(module PipelineModule) *Gate
- func (m Module) GetIGateMap() map[Gate]PipelineModule
- func (m *Module) GetMeta() string
- func (m *Module) GetName() string
- func (m Module) GetNextEGate() Gate
- func (m Module) GetNextIGate() Gate
- func (m *Module) SetEGateMap(gMap map[Gate]PipelineModule)
- func (m *Module) SetIGateMap(gMap map[Gate]PipelineModule)
- func (m *Module) SetMeta(s string)
- func (m *Module) SetName(s string)
- type Pipeline
- type PipelineModule
- type Port
- type Switch
- type URLFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeGateMap ¶
func MakeGateMap() map[Gate]PipelineModule
Create a Gate Map - will include init for default gates later
Types ¶
type EgressPort ¶
EgressPort represents the TX side of a network interface
type IngressPort ¶
IngressPort represents the RX side of a network interface
type L2FIBCommand ¶
type Module ¶
type Module struct { Meta string Name string IGates map[Gate]PipelineModule EGates map[Gate]PipelineModule }
Module represents a generic Network Function. It contains ingress gates and egress gates for traffic flow, which map to the next connected module. Meta field is used to store the name of the Meta Pipeline Module from which this module was created
func (*Module) Connect ¶
func (m *Module) Connect(module PipelineModule, egress bool, gate *Gate) Gate
Connect creates a connection between modules in either ingress/egress direction. module argument should be a pointer to Module type egress defines if this connection should apply to egress or ingress gate map gate defines a specific gate to use and not automatically get next gate
func (*Module) Disconnect ¶
Disconnect removes the connection in a Module's Egress or Ingress Gate Map
func (*Module) GetEGate ¶
func (m *Module) GetEGate(module PipelineModule) *Gate
GetEGate gets the corresponding gate
func (Module) GetEGateMap ¶
func (m Module) GetEGateMap() map[Gate]PipelineModule
GetEGateMap returns the Egress Gate Map for Module
func (*Module) GetIGate ¶
func (m *Module) GetIGate(module PipelineModule) *Gate
GetIGate gets the corresponding gate
func (Module) GetIGateMap ¶
func (m Module) GetIGateMap() map[Gate]PipelineModule
GetIGateMap returns the Ingress Gate Map for Module
func (*Module) GetMeta ¶
GetMeta gets the name of the Meta Pipeline Module used to create this Module
func (Module) GetNextEGate ¶
GetNextEGate returns the next unused Egress gate
func (Module) GetNextIGate ¶
GetNextIGate returns the next unused Ingress gate
func (*Module) SetEGateMap ¶
func (m *Module) SetEGateMap(gMap map[Gate]PipelineModule)
SetEGateMap sets the Egress Gate Map for a Module
func (*Module) SetIGateMap ¶
func (m *Module) SetIGateMap(gMap map[Gate]PipelineModule)
SetIGateMap sets the Ingress Gate Map for a Module
type Pipeline ¶
type Pipeline interface {
GetModule(name string) PipelineModule
}
Pipeline is a generic network pipeline of network modules
type PipelineModule ¶
type PipelineModule interface { Connect(module PipelineModule, egress bool, gate *Gate) Gate Disconnect(gate Gate, egress bool) GetNextIGate() Gate GetNextEGate() Gate GetName() string SetName(s string) GetIGateMap() map[Gate]PipelineModule SetIGateMap(m map[Gate]PipelineModule) GetEGateMap() map[Gate]PipelineModule SetEGateMap(m map[Gate]PipelineModule) SetMeta(s string) GetMeta() string GetIGate(module PipelineModule) *Gate GetEGate(module PipelineModule) *Gate }
PipelineModule type to implement module updates
type Port ¶
type Port struct { PortName string Virtual bool DPDK bool UnixSocket bool IfaceName string Network string NamesSpace string IPAddr string MacAddr string Gateway string SocketPath string }
Port represents a network interface