containerd

package
v1.17.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 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) toml.Loader

CommandLineSource returns the CLI-based containerd config loader

func New

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

New creates a containerd config with the specified options

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

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

AddRuntime adds a runtime to the containerd config

func (Config) DefaultRuntime

func (c Config) DefaultRuntime() string

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

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

RemoveRuntime removes a runtime from the docker config

func (*Config) Set added in v1.14.4

func (c *Config) Set(key string, value interface{})

Set sets the specified containerd option.

type ConfigV1

type ConfigV1 Config

ConfigV1 represents a version 1 containerd config

func (*ConfigV1) AddRuntime

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

AddRuntime adds a runtime to the containerd config

func (ConfigV1) DefaultRuntime

func (c ConfigV1) DefaultRuntime() string

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

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

RemoveRuntime removes a runtime from the docker config

func (ConfigV1) Save

func (c ConfigV1) Save(path string) (int64, error)

Save writes the config to a file

func (*ConfigV1) Set added in v1.14.4

func (c *ConfigV1) Set(key string, value interface{})

Set sets the specified containerd option.

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

func WithConfigSource(configSource toml.Loader) Option

WithConfigSource sets the source for the config.

func WithContainerAnnotations

func WithContainerAnnotations(containerAnnotations ...string) Option

WithContainerAnnotations sets the container annotations for the config builder

func WithLogger

func WithLogger(logger logger.Interface) Option

WithLogger sets the logger for the config builder

func WithPath

func WithPath(path string) Option

WithPath sets the path for the config builder

func WithRuntimeType

func WithRuntimeType(runtimeType string) Option

WithRuntimeType sets the runtime type for the config builder

func WithUseLegacyConfig

func WithUseLegacyConfig(useLegacyConfig bool) Option

WithUseLegacyConfig sets the useLegacyConfig flag for the config builder

Jump to

Keyboard shortcuts

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