Documentation
¶
Index ¶
- func CommandLineSource(hostRoot string, executablePath string) toml.Loader
- func New(opts ...Option) (engine.Interface, error)
- type Config
- func (c *Config) AddRuntime(name string, path string, setAsDefault bool) error
- func (c *Config) AddRuntimeWithOptions(name string, path string, setAsDefault bool, options interface{}) error
- func (c *Config) DefaultRuntime() string
- func (c *Config) EnableCDI()
- func (c *Config) GetDefaultRuntimeOptions() interface{}
- func (c *Config) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
- func (c *Config) RemoveRuntime(name string) error
- func (c *Config) UpdateDefaultRuntime(name string, action string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandLineSource ¶ added in v1.17.0
CommandLineSource returns the CLI-based crio config loader
Types ¶
type Config ¶
Config represents the cri-o config
func (*Config) AddRuntime ¶
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 (*Config) DefaultRuntime ¶
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 ¶
RemoveRuntime removes a runtime from the cri-o config
func (*Config) UpdateDefaultRuntime ¶ added in v1.18.0
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
WithConfigDestination sets the TOML destination for the config.
func WithConfigSource ¶ added in v1.17.0
WithConfigSource sets the TOML source for the config.
func WithLogger ¶
WithLogger sets the logger for the config builder
func WithTopLevelConfigPath ¶ added in v1.18.0
WithTopLevelConfigPath sets the path for the top-level containerd config.