Documentation
¶
Index ¶
- func New(opts ...Option) (engine.Interface, error)
- type Config
- func (c *Config) AddRuntime(name string, path string, setAsDefault bool) error
- func (c Config) DefaultRuntime() string
- func (c *Config) EnableCDI()
- func (c *Config) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
- func (c *Config) RemoveRuntime(name string) error
- func (c Config) Save(path string) (int64, error)
- func (c Config) String() string
- func (c *Config) UpdateDefaultRuntime(name string, action string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config map[string]interface{}
Config defines a docker config file. TODO: This should not be public, but we need to access it from the tests in tools/container/docker
func (*Config) AddRuntime ¶
AddRuntime adds a new runtime to the docker config
func (Config) DefaultRuntime ¶
DefaultRuntime returns the default runtime for the docker config
func (*Config) EnableCDI ¶ added in v1.17.5
func (c *Config) EnableCDI()
EnableCDI sets features.cdi to true in the docker config.
func (*Config) GetRuntimeConfig ¶ added in v1.17.0
func (c *Config) GetRuntimeConfig(name string) (engine.RuntimeConfig, error)
GetRuntimeConfig returns the runtime info of the runtime passed as input
func (*Config) RemoveRuntime ¶
RemoveRuntime removes a runtime from the docker config
func (Config) String ¶ added in v1.17.4
String returns the string representation of the JSON config.
func (*Config) UpdateDefaultRuntime ¶ added in v1.18.0
UpdateDefaultRuntime updates the default runtime setting in the config. When action is 'set' the provided runtime name is set as the default. When action is 'unset' we make sure the provided runtime name is not the default.
type Option ¶
type Option func(*builder)
Option defines a function that can be used to configure the config builder
func WithLogger ¶
WithLogger sets the logger for the config builder