networkAttachDefController

package
v0.0.0-...-4cbcd0d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetworkControllerTopologyNotManaged = errors.New("no cluster network controller to manage topology")

Functions

This section is empty.

Types

type BaseNetworkController

type BaseNetworkController interface {
	Start(ctx context.Context) error
	Stop()
	GetNetworkName() string
}

type NetAttachDefinitionController

type NetAttachDefinitionController struct {
	// contains filtered or unexported fields
}

func NewNetAttachDefinitionController

func NewNetAttachDefinitionController(name string, ncm NetworkControllerManager, networkAttchDefClient nadclientset.Interface,
	recorder record.EventRecorder) (*NetAttachDefinitionController, error)

func (*NetAttachDefinitionController) AddNetAttachDef

func (nadController *NetAttachDefinitionController) AddNetAttachDef(ncm NetworkControllerManager,
	netattachdef *nettypes.NetworkAttachmentDefinition, doStart bool) error

AddNetAttachDef adds the given nad to the associated controller. It creates the controller if this is the first NAD of the network. Non-retriable errors (configuration error etc.) are just logged, and the function immediately returns nil.

func (*NetAttachDefinitionController) DeleteNetAttachDef

func (nadController *NetAttachDefinitionController) DeleteNetAttachDef(netAttachDefName string) error

DeleteNetAttachDef deletes the given NAD from the associated controller. It delete the controller if this is the last NAD of the network

func (*NetAttachDefinitionController) Start

func (nadController *NetAttachDefinitionController) Start() error

func (*NetAttachDefinitionController) Stop

func (nadController *NetAttachDefinitionController) Stop()

func (*NetAttachDefinitionController) SyncNetworkControllers

func (nadController *NetAttachDefinitionController) SyncNetworkControllers() (err error)

type NetworkController

type NetworkController interface {
	BaseNetworkController
	CompareNetInfo(util.BasicNetInfo) bool
	AddNAD(nadName string)
	DeleteNAD(nadName string)
	HasNAD(nadName string) bool
	// Cleanup cleans up the given network, it could be called to clean up network controllers that are deleted when
	// ovn-k8s is down; so it's receiver could be a dummy network controller.
	Cleanup(netName string) error
}

type NetworkControllerManager

type NetworkControllerManager interface {
	NewNetworkController(netInfo util.NetInfo) (NetworkController, error)
	CleanupDeletedNetworks(allControllers []NetworkController) error
}

NetworkControllerManager manages all network controllers

Jump to

Keyboard shortcuts

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