Skip to main content

Module handlers

Module handlers 

Source
Expand description

RPC handler implementations for the backtest server.

Each handler receives a request message, processes it against the shared server state (symbol registry, profile registry, Parquet store), and returns a response message. Errors are captured in the response rather than crashing the server.

Structs§

BacktestJob
Internal representation of an async backtest job.
JobCancellationToken
Lightweight per-job cancellation token without an additional runtime dependency.
ServerState
Shared state accessible by all client handlers.

Enums§

JobStatus
Typed job status for the async backtest API.

Functions§

cancel_active_jobs
Cooperatively cancel every active job during server shutdown.
cleanup_expired_jobs
Remove terminal jobs older than retention and enforce the configured bound.
handle_add_profile
Handle add_profile — add or overwrite a management profile at runtime.
handle_cancel_backtest
Handle cancel_backtest — cancel a submitted job.
handle_delete_result_artifact
Delete a complete result artifact.
handle_get_backtest_result
Handle get_backtest_result — fetch the result of a completed job.
handle_get_backtest_status
Handle get_backtest_status — poll the status of a submitted job.
handle_get_result_artifact_chunk
Return one base64-encoded raw result artifact chunk.
handle_list_profiles
Handle list_profiles — returns all loaded management profiles.
handle_list_symbols
Handle list_symbols — returns available data from the Parquet store.
handle_ping
Handle ping — returns server status and uptime.
handle_reload_profiles
Handle reload_profiles — reload profiles from the configured TOML file.
handle_remove_profile
Handle remove_profile — remove a management profile by name.
handle_run_backtest
Handle the canonical FutureQuoteV1 execution endpoint.
handle_run_backtest_multi
handle_submit_backtest
run_job_and_store
subscribe_backtest_status
Subscribe to the current and future coalesced snapshots of a retained job.
watch_backtest_stream
Build the server stream for a retained backtest job.