config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address         string             `toml:"address"`
	Root            string             `toml:"root"`
	ExternalBuilder string             `toml:"external_builder"`
	ImageService    ImageServiceConfig `toml:"image_service"`
}

Config provides nix-snapshotter configuration data.

func New

func New() *Config

New returns a default config.

func (*Config) Load

func (cfg *Config) Load(ctx context.Context, configPath string) error

Load will unmarshal a toml file at the given config path and merge it with this config. If it doesn't exist, then do nothing.

func (*Config) Merge

func (cfg *Config) Merge(override *Config) error

Merge will fill any attributes with non-empty override attribute values.

type ImageServiceConfig

type ImageServiceConfig struct {
	Enable            bool   `toml:"enable"`
	ContainerdAddress string `toml:"containerd_address"`
}

Jump to

Keyboard shortcuts

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