crio

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandLineSource added in v1.17.0

func CommandLineSource(hostRoot string, executablePath string) toml.Loader

CommandLineSource returns the CLI-based crio config loader

func New

func New(opts ...Option) (engine.Interface, error)

New creates a cri-o config with the specified options

Types

type Config

type Config struct {
	*toml.Tree
	Logger logger.Interface
}

Config represents the cri-o config

func (*Config) AddRuntime

func (c *Config) AddRuntime(name string, path string, setAsDefault bool) error

AddRuntime adds a new runtime to the crio config. The runtime options are extracted from the default runtime and the applicable settings are overridden.

func (*Config) AddRuntimeWithOptions added in v1.18.0

func (c *Config) AddRuntimeWithOptions(name string, path string, setAsDefault bool, options interface{}) error

func (*Config) DefaultRuntime

func (c *Config) DefaultRuntime() string

DefaultRuntime returns the default runtime for the cri-o config

func (*Config) EnableCDI added in v1.17.5

func (c *Config) EnableCDI()

EnableCDI is a no-op for CRI-O since it always enabled where supported.

func (*Config) GetDefaultRuntimeOptions added in v1.18.0

func (c *Config) GetDefaultRuntimeOptions() interface{}

func (*Config) GetRuntimeConfig added in v1.17.0

func (c *Config) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)

func (*Config) RemoveRuntime

func (c *Config) RemoveRuntime(name string) error

RemoveRuntime removes a runtime from the cri-o config

func (*Config) UpdateDefaultRuntime added in v1.18.0

func (c *Config) UpdateDefaultRuntime(name string, action string) error

UpdateDefaultRuntime updates the default runtime setting in the config. When action is 'set' the provided runtime name is set as the default. When action is 'unset' we make sure the provided runtime name is not the default.

type Option

type Option func(*builder)

Option defines a function that can be used to configure the config builder

func WithConfigDestination added in v1.18.0

func WithConfigDestination(configDestination toml.Loader) Option

WithConfigDestination sets the TOML destination for the config.

func WithConfigSource added in v1.17.0

func WithConfigSource(configSource toml.Loader) Option

WithConfigSource sets the TOML source for the config.

func WithLogger

func WithLogger(logger logger.Interface) Option

WithLogger sets the logger for the config builder

func WithTopLevelConfigPath added in v1.18.0

func WithTopLevelConfigPath(path string) Option

WithTopLevelConfigPath sets the path for the top-level containerd config.

Jump to

Keyboard shortcuts

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