mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Merge branch 'rename-discover-merge' into 'main'
Rename discover.NewList to discover.Merge See merge request nvidia/container-toolkit/container-toolkit!182
This commit is contained in:
commit
ec078543a1
@ -51,7 +51,7 @@ func NewGDSDiscoverer(logger *logrus.Logger, root string) (Discover, error) {
|
|||||||
d := gdsDeviceDiscoverer{
|
d := gdsDeviceDiscoverer{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
devices: devices,
|
devices: devices,
|
||||||
mounts: NewList(udev, cufile),
|
mounts: Merge(udev, cufile),
|
||||||
}
|
}
|
||||||
|
|
||||||
return &d, nil
|
return &d, nil
|
||||||
|
@ -27,8 +27,8 @@ type list struct {
|
|||||||
|
|
||||||
var _ Discover = (*list)(nil)
|
var _ Discover = (*list)(nil)
|
||||||
|
|
||||||
// NewList creates a discoverer that is the composite of a list of discoveres.
|
// Merge creates a discoverer that is the composite of a list of discoveres.
|
||||||
func NewList(d ...Discover) Discover {
|
func Merge(d ...Discover) Discover {
|
||||||
l := list{
|
l := list{
|
||||||
discoverers: d,
|
discoverers: d,
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ func NewCSVModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec)
|
|||||||
return nil, fmt.Errorf("failed to create symlink hook discoverer: %v", err)
|
return nil, fmt.Errorf("failed to create symlink hook discoverer: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
d := discover.NewList(csvDiscoverer, ldcacheUpdateHook, createSymlinksHook)
|
d := discover.Merge(csvDiscoverer, ldcacheUpdateHook, createSymlinksHook)
|
||||||
|
|
||||||
discoverModifier, err := NewModifierFromDiscoverer(logger, d)
|
discoverModifier, err := NewModifierFromDiscoverer(logger, d)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user