mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 13:35:00 +00:00
Add mode option to nvcdi API
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
7eb435eb73
commit
5103adab89
@ -28,6 +28,7 @@ import (
|
|||||||
type nvcdilib struct {
|
type nvcdilib struct {
|
||||||
logger *logrus.Logger
|
logger *logrus.Logger
|
||||||
nvmllib nvml.Interface
|
nvmllib nvml.Interface
|
||||||
|
mode string
|
||||||
devicelib device.Interface
|
devicelib device.Interface
|
||||||
deviceNamer DeviceNamer
|
deviceNamer DeviceNamer
|
||||||
driverRoot string
|
driverRoot string
|
||||||
|
@ -66,3 +66,10 @@ func WithNvmlLib(nvmllib nvml.Interface) Option {
|
|||||||
l.nvmllib = nvmllib
|
l.nvmllib = nvmllib
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithMode sets the discovery mode for the library
|
||||||
|
func WithMode(mode string) Option {
|
||||||
|
return func(l *nvcdilib) {
|
||||||
|
l.mode = mode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user