config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultDaemonMode DaemonMode = DaemonModeMultiple

	DefaultLogLevel string = "info"
)
View Source
const (
	FsDriverFusedev string = "fusedev"
	FsDriverFscache string = "fscache"
)

Variables

View Source
var SnapshotsDir string

Functions

func GetFsDriver added in v0.5.0

func GetFsDriver() string

func ProcessParameters added in v0.5.0

func ProcessParameters(args *command.Args, cfg *Config) error

Types

type Config

type Config struct {
	Address                  string        `toml:"-"`
	ConvertVpcRegistry       bool          `toml:"-"`
	DaemonCfgPath            string        `toml:"daemon_cfg_path"`
	PublicKeyFile            string        `toml:"-"`
	RootDir                  string        `toml:"-"`
	CacheDir                 string        `toml:"cache_dir"`
	GCPeriod                 time.Duration `toml:"gc_period"`
	ValidateSignature        bool          `toml:"validate_signature"`
	NydusdBinaryPath         string        `toml:"nydusd_binary_path"`
	NydusImageBinaryPath     string        `toml:"nydus_image_binary"`
	DaemonMode               DaemonMode    `toml:"daemon_mode"`
	FsDriver                 string        `toml:"fs_driver"`
	SyncRemove               bool          `toml:"sync_remove"`
	MetricsAddress           string        `toml:"metrics_address"`
	MetricsFile              string        `toml:"metrics_file"`
	EnableStargz             bool          `toml:"enable_stargz"`
	LogLevel                 string        `toml:"-"`
	LogDir                   string        `toml:"log_dir"`
	LogToStdout              bool          `toml:"log_to_stdout"`
	DisableCacheManager      bool          `toml:"disable_cache_manager"`
	EnableNydusOverlayFS     bool          `toml:"enable_nydus_overlayfs"`
	NydusdThreadNum          int           `toml:"nydusd_thread_num"`
	CleanupOnClose           bool          `toml:"cleanup_on_close"`
	KubeconfigPath           string        `toml:"kubeconfig_path"`
	EnableKubeconfigKeychain bool          `toml:"enable_kubeconfig_keychain"`
	RotateLogMaxSize         int           `toml:"log_rotate_max_size"`
	RotateLogMaxBackups      int           `toml:"log_rotate_max_backups"`
	RotateLogMaxAge          int           `toml:"log_rotate_max_age"`
	RotateLogLocalTime       bool          `toml:"log_rotate_local_time"`
	RotateLogCompress        bool          `toml:"log_rotate_compress"`
	EnableSystemController   bool          `toml:"enable_system_controller"`
	RecoverPolicy            string        `toml:"recover_policy"`
	EnableCRIKeychain        bool          `toml:"enable_cri_keychain"`
	ImageServiceAddress      string        `toml:"image_service_address"`
}
var NydusConfig *Config

func (*Config) ConfigRoot added in v0.5.0

func (c *Config) ConfigRoot() string

func (*Config) FillUpWithDefaults added in v0.4.0

func (c *Config) FillUpWithDefaults() error

func (*Config) SetupNydusBinaryPaths

func (c *Config) SetupNydusBinaryPaths() error

func (*Config) SnapshotRoot added in v0.5.0

func (c *Config) SnapshotRoot() string

Defines snapshots states directories.

func (*Config) SocketRoot added in v0.5.0

func (c *Config) SocketRoot() string

type DaemonMode added in v0.4.0

type DaemonMode string

Define a policy how to fork nydusd daemon and attach file system instances to serve.

const (
	// One nydusd, one rafs instance
	DaemonModeMultiple DaemonMode = "multiple"
	// One nydusd serves multiple rafs instances
	DaemonModeShared DaemonMode = "shared"
	// No nydusd daemon is needed to be started. Snapshotter does not start any nydusd
	// and only interacts with containerd with mount slice to pass necessary configuration
	// to container runtime
	DaemonModeNone    DaemonMode = "none"
	DaemonModeInvalid DaemonMode = ""
)

func GetDaemonMode added in v0.5.0

func GetDaemonMode() DaemonMode

type SnapshotterConfig added in v0.4.0

type SnapshotterConfig struct {
	StartupFlag command.Args `toml:"snapshotter"`
}

func LoadSnapshotterConfig added in v0.4.0

func LoadSnapshotterConfig(snapshotterConfigPath string) (*SnapshotterConfig, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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