sriov

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	SetupVF(conf *sriovtypes.NetConf, podifName string, cid string, netns ns.NetNS) (string, error)
	ReleaseVF(conf *sriovtypes.NetConf, podifName string, cid string, netns ns.NetNS) error
	ResetVFConfig(conf *sriovtypes.NetConf) error
	ApplyVFConfig(conf *sriovtypes.NetConf) error
}

Manager provides interface invoke sriov nic related operations

func NewSriovManager

func NewSriovManager() Manager

NewSriovManager returns an instance of SriovManager

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

MyNetlink NetlinkManager

func (*MyNetlink) LinkByName

func (n *MyNetlink) LinkByName(name string) (netlink.Link, error)

LinkByName implements NetlinkManager

func (*MyNetlink) LinkSetDown

func (n *MyNetlink) LinkSetDown(link netlink.Link) error

LinkSetDown using NetlinkManager

func (*MyNetlink) LinkSetName

func (n *MyNetlink) LinkSetName(link netlink.Link, name string) error

LinkSetName using NetlinkManager

func (*MyNetlink) LinkSetNsFd

func (n *MyNetlink) LinkSetNsFd(link netlink.Link, fd int) error

LinkSetNsFd using NetlinkManager

func (*MyNetlink) LinkSetUp

func (n *MyNetlink) LinkSetUp(link netlink.Link) error

LinkSetUp using NetlinkManager

func (*MyNetlink) LinkSetVfVlan

func (n *MyNetlink) LinkSetVfVlan(link netlink.Link, vf, vlan int) error

LinkSetVfVlan using NetlinkManager

type NetlinkManager

type NetlinkManager interface {
	LinkByName(string) (netlink.Link, error)
	LinkSetVfVlan(netlink.Link, int, int) error
	LinkSetUp(netlink.Link) error
	LinkSetDown(netlink.Link) error
	LinkSetNsFd(netlink.Link, int) error
	LinkSetName(netlink.Link, string) error
}

NetlinkManager is an interface to mock nelink library

Jump to

Keyboard shortcuts

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