Skip to main content

handle_task_endpoint

Function handle_task_endpoint 

Source
pub async fn handle_task_endpoint(
    __arg0: State<Arc<ServerState>>,
    __arg1: Path<(String, String)>,
    __arg2: Query<BTreeMap<String, String>>,
) -> Response
Expand description

Route handler for /tasks/:task/:endpoint.

Looks up the handler the named background task exposed (via BackgroundTask::http_endpoints) and invokes it with a fresh TaskContext built from the daemon’s internal resources. The handler’s TaskEndpointResponse is serialised to JSON or NDJSON depending on its variant.