pub struct Config {
pub max_concurrency: usize,
pub storage_dir: PathBuf,
pub persist_state: bool,
pub cache_capacity: usize,
pub task_timeout: Option<Duration>,
pub max_attempts: u32,
pub metrics_enabled: bool,
pub log_level: String,
}Expand description
Top-level executor configuration.
All fields have sensible defaults (see Config::default) so the executor
can run with zero configuration. Values can also be loaded from a JSON file
or overridden from the environment.
Fields§
§max_concurrency: usizeMaximum number of tasks executing concurrently.
storage_dir: PathBufDirectory used by file-based storage.
persist_state: boolWhether to persist task state to disk during execution.
cache_capacity: usizeLRU cache capacity (entries) sitting in front of storage.
task_timeout: Option<Duration>Default per-task timeout. None disables the timeout.
max_attempts: u32Default maximum execution attempts per task (1 = no retries).
metrics_enabled: boolWhether the metrics endpoint/registry is enabled.
log_level: StringLog level filter (e.g. “info”, “debug”, “dag_executor=trace”).
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_file(path: impl Into<PathBuf>) -> Result<Self>
pub fn from_file(path: impl Into<PathBuf>) -> Result<Self>
Load configuration from a JSON file, falling back to defaults for any missing fields.
Sourcepub fn with_env_overrides(self) -> Self
pub fn with_env_overrides(self) -> Self
Apply overrides from environment variables.
Recognized: DAG_MAX_CONCURRENCY, DAG_STORAGE_DIR, DAG_MAX_ATTEMPTS,
DAG_LOG_LEVEL, DAG_PERSIST_STATE.