Pure functions over a recorded BareBuild log. Every verb takes its entries as an argument. No atom, no DOM, no effect performed.
.cljs rather than .cljc: it requires barebuild.resource, which BareBuild ships as .cljs.
That is its one upstream.
Pure functions over a recorded BareBuild log. Every verb takes its entries as an argument. No atom, no DOM, no effect performed. `.cljs` rather than `.cljc`: it requires `barebuild.resource`, which BareBuild ships as `.cljs`. That is its one upstream.
(answer resource event-k payload)An answering event of kind event-k, carrying payload and the :request/id that resource has
in flight. Throws when event-k answers nothing, or when nothing of that kind is in flight. An
answering event built without that id is dropped by step, which reports :stale-answer and
changes nothing.
An answering event of kind `event-k`, carrying `payload` and the :request/id that `resource` has in flight. Throws when `event-k` answers nothing, or when nothing of that kind is in flight. An answering event built without that id is dropped by `step`, which reports :stale-answer and changes nothing.
(at entries n)The record at position n, payload and all.
The record at position `n`, payload and all.
(coverage entries)What the recorded traffic showed of each resource's declared shape, as {resource-id {…}}. A resource with no installed envelope is absent. :probe/distinct-rows counts rows by the shape's id-key, so paging over the same row twice counts once. It is the denominator that says whether the rest means anything.
What the recorded traffic showed of each resource's declared shape, as {resource-id {…}}. A
resource with no installed envelope is absent. :probe/distinct-rows counts rows by the shape's
id-key, so paging over the same row twice counts once. It is the denominator that says whether
the rest means anything.(diagnosed? row)True when a summary row carries diagnostics. A row that reported nothing carries [], which is
truthy, so a bare keyword lookup matches every row.
True when a summary row carries diagnostics. A row that reported nothing carries `[]`, which is truthy, so a bare keyword lookup matches every row.
(diff entries n)(diff entries a b)What moved, as {resource-id {key [before after]}}. A resource that did not move is absent. Given one position, what moved in the record there. Given two, what moved between the states at each.
What moved, as {resource-id {key [before after]}}. A resource that did not move is absent. Given
one position, what moved in the record there. Given two, what moved between the states at each.(disagreements entries)The positions where a recorded event no longer reproduces its own record. Each names the resource keys that disagree, and the effects as [recorded replayed]. Empty when the log still means what it meant when it was recorded, under the BareBuild on the classpath.
The positions where a recorded event no longer reproduces its own record. Each names the resource keys that disagree, and the effects as [recorded replayed]. Empty when the log still means what it meant when it was recorded, under the BareBuild on the classpath.
(label [k payload])A short readable phrase for event.
A short readable phrase for `event`.
(moved-any ks)A predicate on a summary row: did it move any of ks? Takes the keys, answers the predicate,
so the keys go here and the result goes to filter.
A predicate on a summary row: did it move any of `ks`? Takes the keys, answers the predicate, so the keys go here and the result goes to `filter`.
(read-step resource event)Whether event moves resource, and the diagnostics the step reports. A step that moves
nothing still returns a resource that reads as though the event was handled.
Whether `event` moves `resource`, and the diagnostics the step reports. A step that moves nothing still returns a resource that reads as though the event was handled.
(refuse message code detail)Throws message, carrying code and detail in the one diagnostic shape. Public because
live refuses in the same shape, and one constructor is what keeps them one shape.
Throws `message`, carrying `code` and `detail` in the one diagnostic shape. Public because `live` refuses in the same shape, and one constructor is what keeps them one shape.
(resource entries rid)(resource entries rid n)What rid held at position n, defaulting to the end of the log. The way in when you want one
resource rather than the whole of state.
What `rid` held at position `n`, defaulting to the end of the log. The way in when you want one resource rather than the whole of `state`.
(round-trips entries)One value per event and what it caused: what was asked, what was sent, what came back, and the view consumers were handed, each nil where the trip has none. Every record appears in exactly one trip, and a position navigates to the record it names.
One value per event and what it caused: what was asked, what was sent, what came back, and the view consumers were handed, each nil where the trip has none. Every record appears in exactly one trip, and a position navigates to the record it names.
(state entries)(state entries n)The resources as recorded at position n, and every diagnostic reported up to it. n counts
applied events, and defaults to the whole log. Reads what each step left behind rather than
replaying to it, so it reports what happened rather than what would happen now.
The resources as recorded at position `n`, and every diagnostic reported up to it. `n` counts applied events, and defaults to the whole log. Reads what each step left behind rather than replaying to it, so it reports what happened rather than what would happen now.
(step resource event)barebuild.resource/step, re-exported verbatim.
`barebuild.resource/step`, re-exported verbatim.
(summary entries)One row per record: position, resource id, request id, event key, label, the keys that moved,
and the diagnostics. The request id is nil for an event that names no request. round-trips
pairs a request with its answer. The event value itself is reachable through at, and through
nav.
One row per record: position, resource id, request id, event key, label, the keys that moved, and the diagnostics. The request id is nil for an event that names no request. `round-trips` pairs a request with its answer. The event value itself is reachable through `at`, and through `nav`.
(view entries n)The projection the record at position n handed to consumers, or nil when it notified none.
A step appends that effect only when the view moved, so nil means nothing was handed over rather
than an empty view.
The projection the record at position `n` handed to consumers, or nil when it notified none. A step appends that effect only when the view moved, so nil means nothing was handed over rather than an empty view.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |