Discover Packages
github.com/NVIDIA/mig-parted
api
hooks
v1
package
Version:
v0.9.0
Opens a new window with list of versions in this module.
Published: Aug 28, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Version indicates the version of the 'Spec' struct used to hold 'Hooks' information.
EnvsMap holds the (key, value) pairs associated with a set of environment variables.
Combine merges to EnvMaps together
Overlapping environment variables from e2 take precedence over those in e.
Format converts an EnvMap into a list of strings, where each entry is of the form "key=value".
type HookSpec struct {
Command string `json:"command"`
Args []string `json:"args"`
Envs EnvsMap `json:"envs"`
Workdir string `json:"workdir"`
}
HookSpec holds the actual data associated with a runnable Hook.
Run executes a specific hook from a HookSpec.
It injects the environment variables associated with the provided EnvMap,
and optionally prints the output for each hook to stdout and stderr.
HooksMap holds (key, value) pairs mapping a list of HookSpec's to a named hook.
Run executes all of the hooks associated with a given name in the HooksMap.
It injects the environment variables associated with the provided EnvMap,
and optionally prints the output for each hook to stdout and stderr.
type Spec struct {
Version string `json:"version"`
Hooks HooksMap `json:"hooks"`
}
Spec is a versioned struct used to hold 'Hooks' information.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.