diff --git a/pkg/nvcdi/lib.go b/pkg/nvcdi/lib.go index 0ea1797f..592ff186 100644 --- a/pkg/nvcdi/lib.go +++ b/pkg/nvcdi/lib.go @@ -28,6 +28,7 @@ import ( type nvcdilib struct { logger *logrus.Logger nvmllib nvml.Interface + mode string devicelib device.Interface deviceNamer DeviceNamer driverRoot string diff --git a/pkg/nvcdi/options.go b/pkg/nvcdi/options.go index 50b699a6..317cace2 100644 --- a/pkg/nvcdi/options.go +++ b/pkg/nvcdi/options.go @@ -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 + } +}