Documentation ¶
Index ¶
Constants ¶
View Source
const ( // cf. NVM Express Base Specification 2.0c , section 5: Admin Command Set NVME_ADMIN_GET_LOG_PAGE uint8 = 0x02 NVME_ADMIN_IDENTIFY uint8 = 0x06 )
Variables ¶
View Source
var ( // Defined in <linux/nvme_ioctl.h> NVME_IOCTL_ADMIN_CMD = ioctl.Iowr('N', 0x41, unsafe.Sizeof(nvmePassthruCommand{})) )
View Source
var (
NativeEndian binary.ByteOrder
)
Functions ¶
This section is empty.
Types ¶
type NVMeController ¶
type NVMeController struct { VendorID uint16 ModelNumber string SerialNumber string FirmwareVersion string OUI uint32 // IEEE OUI identifier MaxDataXferSize uint }
NVMeController encapsulates the attributes of an NVMe controller.
func (*NVMeController) Print ¶
func (c *NVMeController) Print(w io.Writer)
Print outputs the attributes of an NVMe controller in a pretty-print style.
type NVMeDevice ¶
type NVMeDevice struct { Name string // contains filtered or unexported fields }
func NewNVMeDevice ¶
func NewNVMeDevice(name string) *NVMeDevice
func (*NVMeDevice) Close ¶
func (d *NVMeDevice) Close() error
func (*NVMeDevice) IdentifyController ¶
func (d *NVMeDevice) IdentifyController(w io.Writer) (NVMeController, error)
func (*NVMeDevice) IdentifyNamespace ¶
func (d *NVMeDevice) IdentifyNamespace(w io.Writer, namespace uint32) error
func (*NVMeDevice) Open ¶
func (d *NVMeDevice) Open() (err error)
func (*NVMeDevice) PrintSMART ¶
func (d *NVMeDevice) PrintSMART(w io.Writer) error
Click to show internal directories.
Click to hide internal directories.