Skip to main content

run_server

Function run_server 

Source
pub async fn run_server(
    listener: TcpListener,
    expected_token: Option<String>,
    workdir: PathBuf,
    custom_shell: Option<String>,
    max_concurrent_runs: Option<usize>,
    tags: Vec<String>,
    min_disk_bytes: Option<u64>,
    cas_dir: Option<PathBuf>,
    no_cas: bool,
    tls_acceptor: Option<TlsAcceptor>,
    max_connections: Option<usize>,
    max_queued_runs: Option<usize>,
    lock_manager: Option<WorkspaceLockManager>,
    metrics_port: Option<u16>,
) -> Result<(), Box<dyn Error>>
Expand description

Accept loop and per-connection dispatch for the agent daemon.

The parameter list is long but each item is a distinct daemon policy (limits, tags, storage, TLS, queueing); grouping them behind a config struct would only move the same fields one call frame away. See ServerContext for the subset the connection handler needs.