Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClaimNotFound = errors.New("claim not found") ErrClaimAlreadyExists = errors.New("claim already exists") )
View Source
var (
ErrNoAddressAvailable = errors.New("no address available")
)
Functions ¶
func CollectTAPFunctions ¶
func CollectTAPFunctions(devices []string) ([]ghw.PCIAddress, error)
func CollectVirtualFunctions ¶
func CollectVirtualFunctions(fs sysfs.FS) ([]ghw.PCIAddress, error)
func GenerateVirtualFunctions ¶ added in v0.3.1
Types ¶
type ClaimStore ¶
type ClaimStore interface { Create(uid types.UID, addr ghw.PCIAddress) error Get(uid types.UID) (*ghw.PCIAddress, error) Delete(uid types.UID) (*ghw.PCIAddress, error) DeleteAll() error List() ([]Claim, error) }
func NewFileClaimStore ¶
func NewFileClaimStore(rootDir string, isTAPStore bool) (ClaimStore, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(store ClaimStore, initAvailable []ghw.PCIAddress) (*Manager, error)
func (*Manager) GetOrClaim ¶
func (*Manager) ReleaseAll ¶ added in v0.3.1
Click to show internal directories.
Click to hide internal directories.