processor

package
v3.3.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Log          logging.Logger
	ServiceLabel servicelabel.ReaderAPI
	ContivConf   contivconf.API
	NodeSync     nodesync.API
	PodManager   podmanager.API
	IPAM         ipam.API
	IPNet        ipnet.API
}

Deps lists dependencies of SFC Processor.

type SFCProcessor

type SFCProcessor struct {
	Deps
	// contains filtered or unexported fields
}

SFCProcessor implements SFCProcessorAPI.

func (*SFCProcessor) AfterInit

func (sp *SFCProcessor) AfterInit() error

AfterInit does nothing for the SFC processor.

func (*SFCProcessor) Close

func (sp *SFCProcessor) Close() error

Close does nothing for the SFC processor.

func (*SFCProcessor) Init

func (sp *SFCProcessor) Init() error

Init initializes SFC processor.

func (*SFCProcessor) RegisterRenderer

func (sp *SFCProcessor) RegisterRenderer(renderer renderer.SFCRendererAPI) error

RegisterRenderer registers a new SFC renderer. The renderer will be receiving updates for all SFCs on the cluster.

func (*SFCProcessor) Resync

func (sp *SFCProcessor) Resync(kubeStateData controller.KubeStateData) error

Resync processes a resync event. The cache content is fully replaced and all registered renderers receive a full snapshot of Contiv SFCs at the present state to be (re)installed.

func (*SFCProcessor) Update

func (sp *SFCProcessor) Update(event controller.Event) error

Update is called for:

  • KubeStateChange for SFC-related an pod-related data

type SFCProcessorAPI

type SFCProcessorAPI interface {
	// Update processes a datasync change event associated with the state data
	// of K8s pods and SFC and custom network CRDs.
	// The data change is stored into the cache and all registered renderers
	// are notified about any changes related to service function chains
	// that need to be reflected in the underlying network stack(s).
	Update(dataChngEv datasync.ChangeEvent) error

	// Resync processes a datasync resync event associated with the state data
	// of K8s pods and SFC and custom network CRDs.
	// The cache content is fully replaced and all registered renderers
	// receive a full snapshot of service function chains at the present
	// state to be (re)installed.
	Resync(resyncEv datasync.ResyncEvent) error

	// RegisterRenderer registers a new service function chain renderer.
	// The renderer will be receiving updates for all SFCs on the cluster.
	RegisterRenderer(renderer renderer.SFCRendererAPI) error
}

SFCProcessorAPI defines the API of the Service Function Chain Processor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL