crio

package
v1.17.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 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 crio config loader

func New

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

New creates a cri-o config with the specified options

Types

type Config

type Config struct {
	*toml.Tree
	Logger logger.Interface
}

Config represents the cri-o config

func (*Config) AddRuntime

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

AddRuntime adds a new runtime to the crio 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 cri-o 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

func WithConfigSource(configSource toml.Loader) Option

WithConfigSource sets the TOML source for the config.

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

Jump to

Keyboard shortcuts

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