plugin

package
v0.0.0-...-55e9ee8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const VspImageIntel string = "IntelVspImage"
View Source
const VspImageMarvell string = "MarvellVspImage"
View Source
const VspImageP4Intel string = "IntelVspP4Image"

Variables

View Source
var VspExtraData = []string{
	VspImageP4Intel,
}

Functions

func CreateVspExtraDataMap

func CreateVspExtraDataMap(fromEnv bool, logger logr.Logger) map[string]string

func CreateVspImagesMap

func CreateVspImagesMap(fromEnv bool, logger logr.Logger) map[string]string

func CreateVspMap

func CreateVspMap(fromEnv bool, logger logr.Logger, VspInfoList []string) map[string]string

func WithPathManager

func WithPathManager(pathManager utils.PathManager) func(*GrpcPlugin)

func WithVsp

func WithVsp(template_vars VspTemplateVars) func(*GrpcPlugin)

Types

type GrpcPlugin

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

func NewGrpcPlugin

func NewGrpcPlugin(dpuMode bool, client client.Client, opts ...func(*GrpcPlugin)) (*GrpcPlugin, error)

func (*GrpcPlugin) CreateBridgePort

func (g *GrpcPlugin) CreateBridgePort(createRequest *opi.CreateBridgePortRequest) (*opi.BridgePort, error)

func (*GrpcPlugin) CreateNetworkFunction

func (g *GrpcPlugin) CreateNetworkFunction(input string, output string) error

func (*GrpcPlugin) DeleteBridgePort

func (g *GrpcPlugin) DeleteBridgePort(deleteRequest *opi.DeleteBridgePortRequest) error

func (*GrpcPlugin) DeleteNetworkFunction

func (g *GrpcPlugin) DeleteNetworkFunction(input string, output string) error

func (*GrpcPlugin) GetDevices

func (g *GrpcPlugin) GetDevices() (*pb.DeviceListResponse, error)

func (*GrpcPlugin) SetNumVfs

func (g *GrpcPlugin) SetNumVfs(count int32) (*pb.VfCount, error)

func (*GrpcPlugin) Start

func (g *GrpcPlugin) Start() (string, int32, error)

func (*GrpcPlugin) Stop

func (g *GrpcPlugin) Stop()

type VendorPlugin

type VendorPlugin interface {
	Start() (string, int32, error)
	Stop()
	CreateBridgePort(bpr *opi.CreateBridgePortRequest) (*opi.BridgePort, error)
	DeleteBridgePort(bpr *opi.DeleteBridgePortRequest) error
	CreateNetworkFunction(input string, output string) error
	DeleteNetworkFunction(input string, output string) error
	GetDevices() (*pb.DeviceListResponse, error)
	SetNumVfs(vfCount int32) (*pb.VfCount, error)
}

type VspTemplateVars

type VspTemplateVars struct {
	VendorSpecificPluginImage string
	Namespace                 string
	ImagePullPolicy           string
	Command                   string
	Args                      string
}

func NewVspTemplateVars

func NewVspTemplateVars() VspTemplateVars

func (VspTemplateVars) ToMap

func (v VspTemplateVars) ToMap() map[string]string

Jump to

Keyboard shortcuts

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