Documentation
¶
Index ¶
Constants ¶
View Source
const ( // NOTE: `localhost` server inside kubernetes may or may not work // based on firewall and network configuration, it would only work // on local system, hence for serving default is 0.0.0.0 DEFAULT_TCP_ADDR = "0.0.0.0:8080" DEFAULT_SOCK_ADDR = "/run/cedana.sock" DEFAULT_SOCK_PERMS = 0o666 DEFAULT_PROTOCOL = "unix" DEFAULT_LOG_LEVEL = "info" DEFAULT_COMPRESSION = "tar" DEFAULT_DUMP_DIR = "/tmp" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLI ¶
type CLI struct {
// Wait for ready sets CLI commands to block if the daemon is not up yet
WaitForReady bool `json:"wait_for_ready" mapstructure:"wait_for_ready"`
}
type Checkpoints ¶
type Config ¶
type Config struct {
// Address to use for incoming/outgoing connections
Address string `json:"address" mapstructure:"address"`
// Protocol to use for incoming/outgoing connections (TCP, UNIX, VSOCK)
Protocol string `json:"protocol" mapstructure:"protocol"`
// LogLevel is the default log level used by the server
LogLevel string `json:"log_level" mapstructure:"log_level"`
// Connection settings
Connection Connection `json:"connection" mapstructure:"connection"`
// Checkpoint and storage settings
Checkpoints Checkpoints `json:"checkpoints" mapstructure:"checkpoints"`
// Database details
DB DB `json:"db" mapstructure:"db"`
// Profiling settings
Profiling Profiling `json:"profiling" mapstructure:"profiling"`
// Metrics settings
Metrics Metrics `json:"metrics" mapstructure:"metrics"`
// CRIU settings and defaults
CRIU CRIU `json:"criu" mapstructure:"criu"`
// CLI settings
CLI CLI `json:"cli" mapstructure:"cli"`
// GPU settings
GPU GPU `json:"gpu" mapstructure:"gpu"`
}
Cedana configuration. Each of the below fields can also be set through an environment variable with the same name, prefixed, and in uppercase. E.g. `Metrics.ASR` can be set with `CEDANA_METRICS_ASR`. The `env_aliases` tag below specifies alternative (alias) environment variable names (comma-separated).
var Global Config = Config{ Protocol: DEFAULT_PROTOCOL, LogLevel: DEFAULT_LOG_LEVEL, Checkpoints: Checkpoints{ Dir: DEFAULT_DUMP_DIR, Compression: DEFAULT_COMPRESSION, }, DB: DB{ Remote: false, Path: filepath.Join(os.TempDir(), "cedana.db"), }, Profiling: Profiling{ Enabled: true, }, Metrics: Metrics{ ASR: false, Otel: false, }, CLI: CLI{ WaitForReady: false, }, CRIU: CRIU{ LeaveRunning: false, }, GPU: GPU{ PoolSize: 0, }, }
The default global config. This will get overwritten by the config file or env vars during startup, if they exist.
type Connection ¶
type GPU ¶
type GPU struct {
// Number of warm GPU controllers to keep in pool
PoolSize int `json:"pool_size" mapstructure:"pool_size"`
}
Click to show internal directories.
Click to hide internal directories.