mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-28 06:52:34 +00:00
[no-relnote] Remove unused code
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
5c3ffc2fba
commit
1afada7de5
@ -20,15 +20,6 @@ const (
|
|||||||
// HookConfig : options for the nvidia-container-runtime-hook.
|
// HookConfig : options for the nvidia-container-runtime-hook.
|
||||||
type HookConfig config.Config
|
type HookConfig config.Config
|
||||||
|
|
||||||
func getDefaultHookConfig() (HookConfig, error) {
|
|
||||||
defaultCfg, err := config.GetDefault()
|
|
||||||
if err != nil {
|
|
||||||
return HookConfig{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return *(*HookConfig)(defaultCfg), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// loadConfig loads the required paths for the hook config.
|
// loadConfig loads the required paths for the hook config.
|
||||||
func loadConfig() (*config.Config, error) {
|
func loadConfig() (*config.Config, error) {
|
||||||
var configPaths []string
|
var configPaths []string
|
||||||
|
@ -24,13 +24,3 @@ type RuntimeHookConfig struct {
|
|||||||
// SkipModeDetection disables the mode check for the runtime hook.
|
// SkipModeDetection disables the mode check for the runtime hook.
|
||||||
SkipModeDetection bool `toml:"skip-mode-detection"`
|
SkipModeDetection bool `toml:"skip-mode-detection"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDefaultRuntimeHookConfig defines the default values for the config
|
|
||||||
func GetDefaultRuntimeHookConfig() (*RuntimeHookConfig, error) {
|
|
||||||
cfg, err := GetDefault()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return &cfg.NVIDIAContainerRuntimeHookConfig, nil
|
|
||||||
}
|
|
||||||
|
@ -45,13 +45,3 @@ type cdiModeConfig struct {
|
|||||||
type csvModeConfig struct {
|
type csvModeConfig struct {
|
||||||
MountSpecPath string `toml:"mount-spec-path"`
|
MountSpecPath string `toml:"mount-spec-path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDefaultRuntimeConfig defines the default values for the config
|
|
||||||
func GetDefaultRuntimeConfig() (*RuntimeConfig, error) {
|
|
||||||
cfg, err := GetDefault()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return &cfg.NVIDIAContainerRuntimeConfig, nil
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user