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
- type ConfigV1
- func (c *ConfigV1) AddRuntime(name string, path string, setAsDefault bool) error
- func (c *ConfigV1) AddRuntimeWithOptions(name string, path string, setAsDefault bool, options interface{}) error
- func (c ConfigV1) DefaultRuntime() string
- func (c *ConfigV1) EnableCDI()
- func (c *ConfigV1) GetDefaultRuntimeOptions() interface{}
- func (c *ConfigV1) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
- func (c *ConfigV1) RemoveRuntime(name string) error
- func (c ConfigV1) Save(path string) (int64, error)
- type ConfigWithDropIn
- type Option
- func WithConfigSource(configSource toml.Loader) Option
- func WithConfigVersion(configVersion int) Option
- func WithContainerAnnotations(containerAnnotations ...string) Option
- func WithContainerPathAsHostPath(containerPath string, hostPath string) Option
- func WithLogger(logger logger.Interface) Option
- func WithRuntimeType(runtimeType string) Option
- func WithTopLevelConfigPath(path string) Option
- func WithUseLegacyConfig(useLegacyConfig bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandLineSource ¶ added in v1.17.0
CommandLineSource returns the CLI-based containerd config loader
Types ¶
type Config ¶
Config represents the containerd config
func (*Config) AddRuntime ¶
AddRuntime adds a runtime to the containerd config
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 sets the enable_cdi field in the Containerd config to true.
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 docker config
type ConfigV1 ¶
type ConfigV1 Config
ConfigV1 represents a version 1 containerd config
func (*ConfigV1) AddRuntime ¶
AddRuntime adds a runtime to the containerd config
func (*ConfigV1) AddRuntimeWithOptions ¶ added in v1.18.0
func (ConfigV1) DefaultRuntime ¶
DefaultRuntime returns the default runtime for the cri-o config
func (*ConfigV1) GetDefaultRuntimeOptions ¶ added in v1.18.0
func (c *ConfigV1) GetDefaultRuntimeOptions() interface{}
func (*ConfigV1) GetRuntimeConfig ¶ added in v1.17.0
func (c *ConfigV1) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
func (*ConfigV1) RemoveRuntime ¶
RemoveRuntime removes a runtime from the docker config
type ConfigWithDropIn ¶ added in v1.18.0
A ConfigWithDropIn represents a pair of containerd configs. The first is the top-level config and the second is an in-memory drop-in config that only contains modifications made to the config.
func NewConfigWithDropIn ¶ added in v1.18.0
func (*ConfigWithDropIn) RemoveRuntime ¶ added in v1.18.0
func (c *ConfigWithDropIn) RemoveRuntime(name string) error
RemoveRuntime removes the runtime from both configs.
type Option ¶
type Option func(*builder)
Option defines a function that can be used to configure the config builder
func WithConfigSource ¶ added in v1.17.0
WithConfigSource sets the source for the config.
func WithConfigVersion ¶ added in v1.17.4
WithConfigVersion sets the config version for the config builder
func WithContainerAnnotations ¶
WithContainerAnnotations sets the container annotations for the config builder
func WithContainerPathAsHostPath ¶ added in v1.18.0
WithContainerPathAsHostPath maps a given container path to a host path.
func WithLogger ¶
WithLogger sets the logger for the config builder
func WithRuntimeType ¶
WithRuntimeType sets the runtime type for the config builder
func WithTopLevelConfigPath ¶ added in v1.18.0
WithTopLevelConfigPath sets the path for the top-level containerd config.
func WithUseLegacyConfig ¶
WithUseLegacyConfig sets the useLegacyConfig flag for the config builder.