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) LinkSetHardwareAddr(link netlink.Link, hwaddr net.HardwareAddr) 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) LinkSetVfHardwareAddr(link netlink.Link, vf int, hwaddr net.HardwareAddr) error
- func (n *MyNetlink) LinkSetVfRate(link netlink.Link, vf int, minRate int, maxRate int) error
- func (n *MyNetlink) LinkSetVfSpoofchk(link netlink.Link, vf int, check bool) error
- func (n *MyNetlink) LinkSetVfState(link netlink.Link, vf int, state uint32) error
- func (n *MyNetlink) LinkSetVfTrust(link netlink.Link, vf int, state bool) error
- func (n *MyNetlink) LinkSetVfVlan(link netlink.Link, vf, vlan int) error
- func (n *MyNetlink) LinkSetVfVlanQos(link netlink.Link, vf, vlan, qos 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 {
NetlinkManager
}
MyNetlink NetlinkManager
func (*MyNetlink) LinkByName ¶
LinkByName implements NetlinkManager
func (*MyNetlink) LinkSetDown ¶
LinkSetDown using NetlinkManager
func (*MyNetlink) LinkSetHardwareAddr ¶
LinkSetHardwareAddr using NetlinkManager
func (*MyNetlink) LinkSetName ¶
LinkSetName using NetlinkManager
func (*MyNetlink) LinkSetNsFd ¶
LinkSetNsFd using NetlinkManager
func (*MyNetlink) LinkSetVfHardwareAddr ¶
LinkSetVfHardwareAddr using NetlinkManager
func (*MyNetlink) LinkSetVfRate ¶
LinkSetVfRate using NetlinkManager
func (*MyNetlink) LinkSetVfSpoofchk ¶
LinkSetVfSpoofchk using NetlinkManager
func (*MyNetlink) LinkSetVfState ¶
LinkSetVfState using NetlinkManager
func (*MyNetlink) LinkSetVfTrust ¶
LinkSetVfTrust using NetlinkManager
func (*MyNetlink) LinkSetVfVlan ¶
LinkSetVfVlan using NetlinkManager
type NetlinkManager ¶
type NetlinkManager interface { LinkByName(string) (netlink.Link, error) LinkSetVfVlan(netlink.Link, int, int) error LinkSetVfVlanQos(netlink.Link, int, int, int) error LinkSetVfHardwareAddr(netlink.Link, int, net.HardwareAddr) error LinkSetHardwareAddr(netlink.Link, net.HardwareAddr) error LinkSetUp(netlink.Link) error LinkSetDown(netlink.Link) error LinkSetNsFd(netlink.Link, int) error LinkSetName(netlink.Link, string) error LinkSetVfRate(netlink.Link, int, int, int) error LinkSetVfSpoofchk(netlink.Link, int, bool) error LinkSetVfTrust(netlink.Link, int, bool) error LinkSetVfState(netlink.Link, int, uint32) error }
NetlinkManager is an interface to mock nelink library
Click to show internal directories.
Click to hide internal directories.