Documentation ¶
Index ¶
- type Manager
- type MyNetlink
- func (n *MyNetlink) LinkByName(name string) (netlink.Link, error)
- func (n *MyNetlink) LinkSetDown(link netlink.Link) error
- func (n *MyNetlink) LinkSetName(link netlink.Link, name string) error
- func (n *MyNetlink) LinkSetNsFd(link netlink.Link, fd int) error
- func (n *MyNetlink) LinkSetUp(link netlink.Link) error
- func (n *MyNetlink) LinkSetVfVlan(link netlink.Link, vf, vlan int) error
- type NetlinkManager
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 ¶
type MyNetlink struct {
// contains filtered or unexported fields
}
MyNetlink NetlinkManager
func (*MyNetlink) LinkByName ¶
LinkByName implements NetlinkManager
func (*MyNetlink) LinkSetDown ¶
LinkSetDown using NetlinkManager
func (*MyNetlink) LinkSetName ¶
LinkSetName using NetlinkManager
func (*MyNetlink) LinkSetNsFd ¶
LinkSetNsFd 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
Click to show internal directories.
Click to hide internal directories.