Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(configFile string, cfg *DaemonConfig) error
func SaveConfig ¶
func SaveConfig(c DaemonConfig, configFile string) error
Types ¶
type Config ¶
type Config struct {
Address string `toml:"-"`
ConvertVpcRegistry bool `toml:"-"`
DaemonCfgPath string `toml:"daemon_cfg_path"`
DaemonCfg DaemonConfig `toml:"-"`
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 string `toml:"daemon_mode"`
AsyncRemove bool `toml:"async_remove"`
EnableMetrics bool `toml:"enable_metrics"`
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"`
}
func (*Config) FillupWithDefaults ¶
func (*Config) SetupNydusBinaryPaths ¶
type DaemonConfig ¶
type DaemonConfig struct {
Device DeviceConfig `json:"device"`
Mode string `json:"mode"`
DigestValidate bool `json:"digest_validate"`
IOStatsFiles bool `json:"iostats_files,omitempty"`
EnableXattr bool `json:"enable_xattr,omitempty"`
FSPrefetch struct {
Enable bool `json:"enable"`
PrefetchAll bool `json:"prefetch_all"`
ThreadsCount int `json:"threads_count"`
MergingSize int `json:"merging_size"`
} `json:"fs_prefetch,omitempty"`
}
func NewDaemonConfig ¶
func NewDaemonConfig(cfg DaemonConfig, imageID string, vpcRegistry bool, labels map[string]string) (DaemonConfig, error)
type DeviceConfig ¶
type DeviceConfig struct {
Backend struct {
BackendType string `json:"type"`
Config struct {
// Localfs backend configs
BlobFile string `json:"blob_file,omitempty"`
Dir string `json:"dir,omitempty"`
ReadAhead bool `json:"readahead"`
ReadAheadSec int `json:"readahead_sec,omitempty"`
// Registry backend configs
Host string `json:"host,omitempty"`
Repo string `json:"repo,omitempty"`
Auth string `json:"auth,omitempty"`
RegistryToken string `json:"registry_token,omitempty"`
BlobURLScheme string `json:"blob_url_scheme,omitempty"`
BlobRedirectedHost string `json:"blob_redirected_host,omitempty"`
// OSS backend configs
EndPoint string `json:"endpoint,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
AccessKeySecret string `json:"access_key_secret,omitempty"`
BucketName string `json:"bucket_name,omitempty"`
ObjectPrefix string `json:"object_prefix,omitempty"`
// Shared by registry and oss backend
Scheme string `json:"scheme,omitempty"`
SkipVerify bool `json:"skip_verify,omitempty"`
// Below configs are common configs shared by all backends
Proxy struct {
URL string `json:"url,omitempty"`
Fallback bool `json:"fallback"`
PingURL string `json:"ping_url,omitempty"`
CheckInterval int `json:"check_interval,omitempty"`
} `json:"proxy,omitempty"`
Timeout int `json:"timeout,omitempty"`
ConnectTimeout int `json:"connect_timeout,omitempty"`
RetryLimit int `json:"retry_limit,omitempty"`
} `json:"config"`
} `json:"backend"`
Cache struct {
CacheType string `json:"type"`
Compressed bool `json:"compressed,omitempty"`
Config struct {
WorkDir string `json:"work_dir"`
DisableIndexedMap bool `json:"disable_indexed_map"`
} `json:"config"`
} `json:"cache"`
}
Click to show internal directories.
Click to hide internal directories.