[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:
Tariq Ibrahim
2024-10-10 09:50:48 -07:00
committed by Evan Lezar
parent a06d838b1c
commit b90ee5d100
9 changed files with 20 additions and 19 deletions

View File

@@ -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)
}

View File

@@ -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 ""

View File

@@ -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 {

View File

@@ -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 ""