root

package
v1.17.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {

	// Root represents the root from the perspective of the driver libraries and binaries.
	Root string
	// contains filtered or unexported fields
}

Driver represents a filesystem in which a set of drivers or devices is defined.

func New

func New(opts ...Option) *Driver

New creates a new Driver root using the specified options.

func (*Driver) Configs

func (r *Driver) Configs() lookup.Locator

Configs returns a locator for driver configs. If configSearchPaths is specified, these paths are used as absolute paths, otherwise, /etc and /usr/share are searched.

func (*Driver) Files added in v1.16.0

func (r *Driver) Files(opts ...lookup.Option) lookup.Locator

Files returns a Locator for arbitrary driver files.

func (*Driver) Libraries

func (r *Driver) Libraries() lookup.Locator

Libraries returns a Locator for driver libraries.

func (*Driver) RelativeToRoot added in v1.16.0

func (r *Driver) RelativeToRoot(path string) string

RelativeToRoot returns the specified path relative to the driver root.

type Option

type Option func(*Driver)

func WithConfigSearchPaths

func WithConfigSearchPaths(paths ...string) Option

func WithDriverRoot

func WithDriverRoot(root string) Option

func WithLibrarySearchPaths

func WithLibrarySearchPaths(paths ...string) Option

func WithLogger

func WithLogger(logger logger.Interface) Option

Jump to

Keyboard shortcuts

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