Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContivSFC ¶
type ContivSFC struct { // Name uniquely identifies a service function chain. Name string // Network defines a custom network where the chain is being rendered, // may be empty in case of the default network. Network string // Chain contains a list of instances of the service function chain // (each chain can render into multiple instances e.g. in case of multiple pods // matching a pod selector) Chain []*ServiceFunction }
ContivSFC is a less-abstract, free of indirect references representation of Service Function Chain in Contiv. It contains lists of individual chain instances, each referencing pods that need to be chained together.
type InterfaceSF ¶
type InterfaceSF struct { // InterfaceName contains name of the interface to/from which the traffic flows // (can be used for the configuration without further processing). InterfaceName string NodeID uint32 // ID of the node where the interface resides Local bool // true if this is a node-local interface }
InterfaceSF represents an interface-type service function.
func (InterfaceSF) String ¶
func (iface InterfaceSF) String() string
String converts InterfaceSF into a human-readable string.
type PodSF ¶
type PodSF struct { ID pod.ID // pod identifier NodeID uint32 // ID of the node where the service function runs Local bool // true if this is a node-local pod // For local pods, interface names contain actual pod interface names which can be used for configuration // without further processing. Non-local pods contain logical names as they came from CRD. InputInterface string // name of the interface trough which the traffic enters the pod OutputInterface string // name of the interface using which the traffic leaves the pod }
PodSF represents a pod-type service function.
type ResyncEventData ¶
type ResyncEventData struct { // Chains is a list of all currently deployed service function chains. Chains []*ContivSFC }
ResyncEventData wraps an entire state of K8s services as provided by the Processor.
func (ResyncEventData) String ¶
func (red ResyncEventData) String() string
String converts ResyncEventData into a human-readable string.
type SFCRendererAPI ¶
type SFCRendererAPI interface { // AddChain is called for a newly added service function chain. AddChain(chain *ContivSFC) error // UpdateChain informs renderer about a change in the configuration // or in the state of a service function chain. UpdateChain(oldChain, newChain *ContivSFC) error // DeleteChain is called for every removed service function chain. DeleteChain(chain *ContivSFC) error // Resync provides a complete snapshot of all service function chain-related data. // The renderer should resolve any discrepancies between the state of SFC in K8s // and the currently rendered configuration. Resync(resyncEv *ResyncEventData) error }
SFCRendererAPI defines the API of Service Function Chain Renderer.
type ServiceFunction ¶
type ServiceFunction struct { // Type defines the type of the service function Type ServiceFunctionType // Pods satisfying the pod selector criteria for this service function. Pods []*PodSF // ExternalInterfaces contains list of interfaces satisfying the interface selector criteria for this service function. ExternalInterfaces []*InterfaceSF }
ServiceFunction represents a single service function element in the chain.
It can be represented by multiple interfaces or running pods, which can render into multiple traffic paths. It is the responsibility of the SFC renderer to render that into a physical networking configuration that makes sense for the particular case (e.g. load-balance the traffic through multiple chains, or just select one of the candidate pods making the rest of the pods a hot backup).
func (ServiceFunction) String ¶
func (sf ServiceFunction) String() string
String converts ServiceFunction into a human-readable string.
type ServiceFunctionType ¶
type ServiceFunctionType int
ServiceFunctionType defines type of a service function in the chain.
const ( // Pod means that the service function item is a k8s pod. Pod ServiceFunctionType = 0 // ExternalInterface means that the service function item is an external VPP interface. ExternalInterface ServiceFunctionType = iota )
func (ServiceFunctionType) String ¶
func (t ServiceFunctionType) String() string
String converts ProtocolType into a human-readable string.