Skip to content
Get started

Discover passthrough-capable devices on host

client.Devices.ListAvailable(ctx) (*[]AvailableDevice, error)
get/devices/available

Discover passthrough-capable devices on host

ReturnsExpand Collapse
type DeviceListAvailableResponse []AvailableDevice
DeviceID string

PCI device ID (hex)

IommuGroup int64

IOMMU group number

PciAddress string

PCI address

VendorID string

PCI vendor ID (hex)

CurrentDriver stringoptional

Currently bound driver (null if none)

DeviceName stringoptional

Human-readable device name

VendorName stringoptional

Human-readable vendor name

Discover passthrough-capable devices on host
package main

import (
  "context"
  "fmt"

  "github.com/kernel/hypeman-go"
  "github.com/kernel/hypeman-go/option"
)

func main() {
  client := hypeman.NewClient(
    option.WithAPIKey("My API Key"),
  )
  availableDevices, err := client.Devices.ListAvailable(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", availableDevices)
}
[
  {
    "device_id": "27b8",
    "iommu_group": 82,
    "pci_address": "0000:a2:00.0",
    "vendor_id": "10de",
    "current_driver": "nvidia",
    "device_name": "L4",
    "vendor_name": "NVIDIA Corporation"
  }
]
Returns Examples
[
  {
    "device_id": "27b8",
    "iommu_group": 82,
    "pci_address": "0000:a2:00.0",
    "vendor_id": "10de",
    "current_driver": "nvidia",
    "device_name": "L4",
    "vendor_name": "NVIDIA Corporation"
  }
]