quasar_mist

Managed request execution for Mist handlers.

Mist continues to own sockets, TLS, parsing, protocol handling, and byte transmission. Quasar manages only the synchronous execution that produces a response value. WebSockets, SSE, streaming, chunked responses, and connection ownership transfers must bypass manage in the MVP.

Values

pub fn accepted(
  result: Result(job.JobId, error.JobError),
) -> response.Response(mist.ResponseData)

Builds a 202 response for a successfully inserted durable job.

pub fn error_response(
  error: error.ExecuteError,
  request_id: String,
) -> response.Response(mist.ResponseData)

Converts Quasar execution failures to conservative HTTP responses.

pub fn manage(
  handler: fn(request.Request(mist.Connection)) -> response.Response(
    mist.ResponseData,
  ),
  using runtime: quasar_jobs.Runtime,
  pool pool: String,
  timeout timeout: Int,
) -> fn(request.Request(mist.Connection)) -> response.Response(
  mist.ResponseData,
)

Wraps a fixed-response Mist handler in a named Quasar local pool.

Requests are ephemeral, local to the BEAM node, at-most-once, and never retried. A 504 deadline response does not prove the handler stopped.

Search Document