containerd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestartContainerd

func RestartContainerd(socket string) error

RestartContainerd restarts containerd by sending a SIGHUP signal to the containerd daeon

Types

type Config

type Config struct {
	*toml.Tree
	RuntimeType           string
	UseDefaultRuntimeName bool
	PodAnnotations        []string
}

Config represents the containerd config

func New

func New(opts ...Option) (*Config, error)

New creates a containerd config with the specified options

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 containerd config

func (*Config) RemoveRuntime

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

RemoveRuntime removes a runtime from the containerd config

func (*Config) Save

func (c *Config) Save(path string) (int64, error)

Save writes the config to the specified path

type Option

type Option func(*builder)

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

func WithPath

func WithPath(path string) Option

WithPath sets the path for the config builder

func WithPodAnnotations

func WithPodAnnotations(podAnnotations ...string) Option

WithPodAnnotations sets the container annotations 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