tegra

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (discover.Discover, error)

New creates a new tegra discoverer using the supplied functional options.

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

Merge combines the MountSpecPathsByType for the specified sources.

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

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

func WithDriver(driver *root.Driver) Option

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

func WithLibrarySearchPaths(librarySearchPaths ...string) Option

WithLibrarySearchPaths sets the library search paths for the discoverer.

func WithLogger

func WithLogger(logger logger.Interface) Option

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 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL