mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +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 {
|
||||
logger *logrus.Logger
|
||||
nvmllib nvml.Interface
|
||||
mode string
|
||||
devicelib device.Interface
|
||||
deviceNamer DeviceNamer
|
||||
driverRoot string
|
||||
|
@ -66,3 +66,10 @@ func WithNvmlLib(nvmllib nvml.Interface) Option {
|
||||
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