mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
[no-relnote] minor cleanup and improvements
Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com> Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
committed by
Evan Lezar
parent
a06d838b1c
commit
b90ee5d100
@@ -141,14 +141,14 @@ func (c *ConfigV1) RemoveRuntime(name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetOption sets the specified containerd option.
|
||||
// Set sets the specified containerd option.
|
||||
func (c *ConfigV1) Set(key string, value interface{}) {
|
||||
config := *c.Tree
|
||||
config.SetPath([]string{"plugins", "cri", "containerd", key}, value)
|
||||
*c.Tree = config
|
||||
}
|
||||
|
||||
// Save wrotes the config to a file
|
||||
// Save writes the config to a file
|
||||
func (c ConfigV1) Save(path string) (int64, error) {
|
||||
return (Config)(c).Save(path)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,8 @@ type containerdCfgRuntime struct {
|
||||
|
||||
var _ engine.RuntimeConfig = (*containerdCfgRuntime)(nil)
|
||||
|
||||
// GetBinaryPath retrieves the path to the actual low-level runtime binary invoked by the runtime handler
|
||||
// GetBinaryPath retrieves the path to the low-level runtime binary for a runtime.
|
||||
// If no path is available, the empty string is returned.
|
||||
func (c *containerdCfgRuntime) GetBinaryPath() string {
|
||||
if c == nil || c.tree == nil {
|
||||
return ""
|
||||
|
||||
@@ -36,7 +36,8 @@ type crioRuntime struct {
|
||||
|
||||
var _ engine.RuntimeConfig = (*crioRuntime)(nil)
|
||||
|
||||
// GetBinaryPath retrieves the path to the actual low-level runtime binary invoked by the runtime handler
|
||||
// GetBinaryPath retrieves the path to the low-level runtime binary for a runtime.
|
||||
// If no path is available, the empty string is returned.
|
||||
func (c *crioRuntime) GetBinaryPath() string {
|
||||
if c.tree != nil {
|
||||
if binaryPath, ok := c.tree.GetPath([]string{"runtime_path"}).(string); ok {
|
||||
|
||||
@@ -39,7 +39,8 @@ type dockerRuntime map[string]interface{}
|
||||
|
||||
var _ engine.RuntimeConfig = (*dockerRuntime)(nil)
|
||||
|
||||
// GetBinaryPath retrieves the path to the actual low-level runtime binary invoked by the runtime handler
|
||||
// GetBinaryPath retrieves the path to the low-level runtime binary for a runtime.
|
||||
// If no path is available, the empty string is returned.
|
||||
func (d dockerRuntime) GetBinaryPath() string {
|
||||
if d == nil {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user