Documentation ¶
Index ¶
- func CommandLineSource(hostRoot string) toml.Loader
- func New(opts ...Option) (engine.Interface, error)
- type Config
- type ConfigV1
- func (c *ConfigV1) AddRuntime(name string, path string, setAsDefault bool) error
- func (c ConfigV1) DefaultRuntime() string
- func (c *ConfigV1) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
- func (c *ConfigV1) RemoveRuntime(name string) error
- func (c ConfigV1) Save(path string) (int64, error)
- func (c *ConfigV1) Set(key string, value interface{})
- type Option
- func WithConfigSource(configSource toml.Loader) Option
- func WithContainerAnnotations(containerAnnotations ...string) Option
- func WithLogger(logger logger.Interface) Option
- func WithPath(path string) Option
- func WithRuntimeType(runtimeType 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 ¶
type Config struct { *toml.Tree Logger logger.Interface RuntimeType string UseDefaultRuntimeName bool ContainerAnnotations []string }
Config represents the containerd config
func (*Config) AddRuntime ¶
AddRuntime adds a runtime to the containerd config
func (Config) DefaultRuntime ¶
DefaultRuntime returns the default runtime for the cri-o config
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) DefaultRuntime ¶
DefaultRuntime returns the default runtime for the cri-o config
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 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 WithContainerAnnotations ¶
WithContainerAnnotations sets the container annotations for the config builder
func WithLogger ¶
WithLogger sets the logger for the config builder
func WithRuntimeType ¶
WithRuntimeType sets the runtime type for the config builder
func WithUseLegacyConfig ¶
WithUseLegacyConfig sets the useLegacyConfig flag for the config builder