Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MountSpecPathsByType ¶ added in v1.19.0
type MountSpecPathsByType map[csv.MountSpecType][]string
MountSpecPathsByType define the per-type paths that define the entities (e.g. device nodes, directories, libraries, symlinks) that are required for gpu use on Tegra-based systems. These are typically populated from CSV files defined by the platform owner.
func MountSpecsFromCSVFiles ¶ added in v1.19.0
func MountSpecsFromCSVFiles(logger logger.Interface, csvFilePaths ...string) MountSpecPathsByType
MountSpecsFromCSVFiles returns a MountSpecPathsByTyper for the specified list of CSV files.
func (MountSpecPathsByType) MountSpecPathsByType ¶ added in v1.19.0
func (m MountSpecPathsByType) MountSpecPathsByType() MountSpecPathsByType
MountSpecPathsByType for a variable of type MountSpecPathsByType returns the underlying data structure. This allows for using this type in functions such as Merge and Filter.
type MountSpecPathsByTyper ¶ added in v1.19.0
type MountSpecPathsByTyper interface {
MountSpecPathsByType() MountSpecPathsByType
}
func DeviceNodes ¶ added in v1.19.0
func DeviceNodes(dn ...string) MountSpecPathsByTyper
DeviceNodes creates a set of MountSpecPaths for the specified device nodes. These have the MoutSpecDev type.
func Merge ¶ added in v1.19.0
func Merge(sources ...MountSpecPathsByTyper) MountSpecPathsByTyper
Merge combines the MountSpecPathsByType for the specified sources.
func Symlinks ¶ added in v1.19.0
func Symlinks(s ...string) MountSpecPathsByTyper
DeviceNodes creates a set of MountSpecPaths for the specified symlinks. These have the MountSpecSym type.
func Transform ¶ added in v1.19.0
func Transform(input MountSpecPathsByTyper, t ...Transformer) MountSpecPathsByTyper
Transform applies the specified transforms to a set of mount specs by type. The result is itself a set of mount specs by type.
type Option ¶
type Option func(*options)
Option defines a functional option for configuring a Tegra discoverer.
func WithDriver ¶ added in v1.19.0
WithDriverRoot sets the driver root for the discoverer.
func WithHookCreator ¶ added in v1.18.0
func WithHookCreator(hookCreator discover.HookCreator) Option
WithHookCreator sets the hook creator for the discoverer.
func WithLibrarySearchPaths ¶
WithLibrarySearchPaths sets the library search paths for the discoverer.
func WithLogger ¶
WithLogger sets the logger for the discoverer.
func WithMountSpecs ¶ added in v1.19.0
func WithMountSpecs(mountSpecs ...MountSpecPathsByTyper) Option
type Transformer ¶ added in v1.19.0
type Transformer interface {
Apply(MountSpecPathsByTyper) MountSpecPathsByTyper
}
A Transformer modifies a specified set of mount specs by type. The output of a transformer is itself a set of mount specs by type.
func IgnoreSymlinkMountSpecsByPattern ¶ added in v1.19.0
func IgnoreSymlinkMountSpecsByPattern(ignorePatterns ...string) Transformer
func OnlyDeviceNodes ¶ added in v1.19.0
func OnlyDeviceNodes() Transformer
OnlyDeviceNodes creates a transformer that will remove any input mounts specs that are not of the `MountSpecDev` type.
func Without ¶ added in v1.19.0
func Without(m MountSpecPathsByTyper) Transformer
func WithoutDeviceNodes ¶ added in v1.19.0
func WithoutDeviceNodes() Transformer
WithoutDeviceNodes creates a transformer that will remove entries with type MountSpecDevice from the input.
func WithoutRegularDeviceNodes ¶ added in v1.19.0
func WithoutRegularDeviceNodes() Transformer
WithoutRegularDeviceNodes creates a transfomer which removes regular `/dev/nvidia[0-9]+` device nodes from the source.