interfaceservice

package
v0.0.0-...-4380e07 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KernelNetworkDevicesProvider stores function providing
	// functionality to get network interfaces
	KernelNetworkDevicesProvider = getKernelNetworkDevices

	// Vsctl stores function which executes ovs-vsctl command with given args
	Vsctl = vsctl
	// Devbind stores function which executes dpdk-devbind.py command with given args
	Devbind = devbind

	// ReattachDpdkPorts function pointer called before server is up and running
	ReattachDpdkPorts = reattachDpdkPorts
)

Functions

func Run

func Run(ctx context.Context, cfgPath string) error

Run function runs a Interface Service

Types

type Configuration

type Configuration struct {
	Endpoint          string        `json:"Endpoint"`
	HeartbeatInterval util.Duration `json:"HeartbeatInterval"`
	CertsDir          string        `json:"CertsDirectory"`
}

Configuration describes JSON configuration

var (

	// Config instantiate a configuration
	Config Configuration

	// DpdkEnabled var specifies if interface service can use DPDK drivers
	DpdkEnabled = true
)

type InterfaceService

type InterfaceService struct{}

InterfaceService provides service for managing physical network interfaces in kube-ovn mode. It exposes Get method which provides information about interfaces. It also exposes Attach and Detach methods which can be used to configure those interfaces.

func (*InterfaceService) Attach

func (*InterfaceService) Attach(ctx context.Context,
	ports *pb.Ports) (*empty.Empty, error)

Attach triggers operation of attaching an interface to provided bridge. It requires full definition of Ports.

func (*InterfaceService) Detach

func (*InterfaceService) Detach(ctx context.Context,
	ports *pb.Ports) (*empty.Empty, error)

Detach removes a port from a bridge. It requires PCI only.

func (*InterfaceService) Get

Get fetches all ports from the server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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