retrace_frontend/client
JavaScript delivery runtime. Capture and application updates remain separate. The host owns start/stop; saved batches drain across runtime restarts.
Types
pub type Config {
Config(
endpoint: String,
queue_name: String,
max_items: Int,
max_bytes: Int,
)
}
Constructors
-
Config( endpoint: String, queue_name: String, max_items: Int, max_bytes: Int, )
pub type Status {
Status(queued: Int, acknowledged: Int, detail: String)
}
Constructors
-
Status(queued: Int, acknowledged: Int, detail: String)
A factory that opens caller-owned persistence. Use retrace_frontend/client/adapter to construct one from Gleam operations, or provide an existing FFI adapter.
pub type Storage
Values
pub fn browser_storage() -> Storage
pub fn enqueue(
client: Client,
batch: wire.Batch,
saved: fn(Result(Nil, String)) -> Nil,
) -> Nil
Called after projection. The callback confirms local persistence, not upload. Validation failure does not touch local storage or the network.
pub fn http_transport(endpoint: String) -> Transport