Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  const ( NVIDIAUVMMinor = 0 NVIDIAUVMToolsMinor = 1 NVIDIACTLMinor = 255 NVIDIAModesetMinor = 254 NVIDIAFrontend = Name("nvidia-frontend") NVIDIAGPU = NVIDIAFrontend NVIDIACaps = Name("nvidia-caps") NVIDIAUVM = Name("nvidia-uvm") )
Device major numbers and device names for NVIDIA devices
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Devices ¶
Devices represents the set of devices under /proc/devices
func GetNVIDIADevices ¶
GetNVIDIADevices returns the set of NVIDIA Devices on the machine
type DevicesMock ¶
type DevicesMock struct {
	// ExistsFunc mocks the Exists method.
	ExistsFunc func(name Name) bool
	// GetFunc mocks the Get method.
	GetFunc func(name Name) (Major, bool)
	// contains filtered or unexported fields
}
    DevicesMock is a mock implementation of Devices.
func TestSomethingThatUsesDevices(t *testing.T) {
	// make and configure a mocked Devices
	mockedDevices := &DevicesMock{
		ExistsFunc: func(name Name) bool {
			panic("mock out the Exists method")
		},
		GetFunc: func(name Name) (Major, bool) {
			panic("mock out the Get method")
		},
	}
	// use mockedDevices in code that requires Devices
	// and then make assertions.
}
func (*DevicesMock) Exists ¶
func (mock *DevicesMock) Exists(name Name) bool
Exists calls ExistsFunc.
func (*DevicesMock) ExistsCalls ¶
func (mock *DevicesMock) ExistsCalls() []struct { Name Name }
ExistsCalls gets all the calls that were made to Exists. Check the length with:
len(mockedDevices.ExistsCalls())
func (*DevicesMock) GetCalls ¶
func (mock *DevicesMock) GetCalls() []struct { Name Name }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedDevices.GetCalls())
 Click to show internal directories. 
   Click to hide internal directories.