modprobe

package
v27.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package modprobe attempts to load kernel modules. It may have more success than simply running "modprobe", particularly for docker-in-docker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadModules

func LoadModules(ctx context.Context, isLoaded func() error, modNames ...string) error

LoadModules attempts to load kernel modules, if necessary.

isLoaded must be a function that checks whether the modules are loaded. It may be called multiple times. isLoaded must return an error to indicate that the modules still need to be loaded, otherwise nil.

For each method of loading modules, LoadModules will attempt the load for each of modNames, then it will call isLoaded to check the result - moving on to try the next method if needed, and there is one.

The returned error is the result of the final call to isLoaded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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