(deliver req & [info])
Returns an action to add the given request to the end of the next
queue delivery-queue
up in the item tree. An arbitrary info
value can be attached, identifying or describing the request.
Returns an action to add the given request to the end of the next queue [[delivery-queue]] up in the item tree. An arbitrary `info` value can be attached, identifying or describing the request.
(delivery-job! req & [info])
Returns a new delivery job, that you can put into the state backing
up a delivery-queue
.
Returns a new delivery job, that you can put into the state backing up a [[delivery-queue]].
(delivery-job-id rec__3187__auto__)
(delivery-job-id data__3188__auto__ v__3189__auto__)
Lens for the id
field from a DeliveryJob
record. See reacl-c-basics.ajax/make-delivery-job
.
Lens for the `id` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-job-info rec__3187__auto__)
(delivery-job-info data__3188__auto__ v__3189__auto__)
Lens for the info
field from a DeliveryJob
record. See reacl-c-basics.ajax/make-delivery-job
.
Lens for the `info` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-job-request rec__3187__auto__)
(delivery-job-request data__3188__auto__ v__3189__auto__)
Lens for the req
field from a DeliveryJob
record. See reacl-c-basics.ajax/make-delivery-job
.
Lens for the `req` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-job-response rec__3187__auto__)
(delivery-job-response data__3188__auto__ v__3189__auto__)
Lens for the response
field from a DeliveryJob
record. See reacl-c-basics.ajax/make-delivery-job
.
Lens for the `response` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-job-status rec__3187__auto__)
(delivery-job-status data__3188__auto__ v__3189__auto__)
Lens for the status
field from a DeliveryJob
record. See reacl-c-basics.ajax/make-delivery-job
.
Lens for the `status` field from a [[DeliveryJob]] record. See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-job? thing)
Is object a DeliveryJob
record? See reacl-c-basics.ajax/make-delivery-job
.
Is object a `DeliveryJob` record? See [[reacl-c-basics.ajax/make-delivery-job]].
(delivery-queue e lens & [options])
Returns an item that manages a sequence of Ajax requests in its
state, under the given lens
. You can add [[delivery-job]] values
to it, or use deliver
to get an action that can be emitted by
e
and adds jobs to the end of the queue.
Jobs transition from a :pending state, over :running
into :completed (successful or not). When (:auto-cleanup? options)
is true, sucessfully completed jobs are eventually removed
from the queue automatically. When (:parallel? options)
is true,
then not only the first non-completed job is executed, but all are
started in parallel (though the browser might actually only run 2 at
the same time).
Returns an item that manages a sequence of Ajax requests in its state, under the given `lens`. You can add [[delivery-job]] values to it, or use [[deliver]] to get an action that can be emitted by `e` and adds jobs to the end of the queue. Jobs transition from a :pending state, over :running into :completed (successful or not). When `(:auto-cleanup? options)` is true, sucessfully completed jobs are eventually removed from the queue automatically. When `(:parallel? options)` is true, then not only the first non-completed job is executed, but all are started in parallel (though the browser might actually only run 2 at the same time).
(fetch req)
Returns an invisible item, that will execute the given request whenever its state is or becomes nil, and set its state to the success or error response as soon as available.
Returns an invisible item, that will execute the given request whenever its state is or becomes nil, and set its state to the success or error response as soon as available.
(fetch-once req f)
Returns an invisible item, that will execute the given Ajax
request once, when mounted. When the request completes with an error
or success, then (f state response)
is evaluated, which
must return a [[reacl-c.core/return]] value.
Returns an invisible item, that will execute the given Ajax request once, when mounted. When the request completes with an error or success, then `(f state response)` is evaluated, which must return a [[reacl-c.core/return]] value.
(hidden-delivery-queue e & [options])
Like delivery-queue
, but with a hidden queue in local state.
Like [[delivery-queue]], but with a hidden queue in local state.
(make-delivery-job id req info status response)
Construct a DeliveryJob
record.
id
: access via reacl-c-basics.ajax/delivery-job-id
req
: access via reacl-c-basics.ajax/delivery-job-request
info
: access via reacl-c-basics.ajax/delivery-job-info
status
: access via reacl-c-basics.ajax/delivery-job-status
response
: access via reacl-c-basics.ajax/delivery-job-response
Construct a `DeliveryJob` record. `id`: access via [[reacl-c-basics.ajax/delivery-job-id]] `req`: access via [[reacl-c-basics.ajax/delivery-job-request]] `info`: access via [[reacl-c-basics.ajax/delivery-job-info]] `status`: access via [[reacl-c-basics.ajax/delivery-job-status]] `response`: access via [[reacl-c-basics.ajax/delivery-job-response]]
(make-response ok? value)
Construct a Response
record.
ok?
: access via reacl-c-basics.ajax/response-ok?
value
: access via reacl-c-basics.ajax/response-value
Construct a `Response` record. `ok?`: access via [[reacl-c-basics.ajax/response-ok?]] `value`: access via [[reacl-c-basics.ajax/response-value]]
(response-ok? rec__3187__auto__)
(response-ok? data__3188__auto__ v__3189__auto__)
Lens for the ok?
field from a Response
record. See reacl-c-basics.ajax/make-response
.
Lens for the `ok?` field from a [[Response]] record. See [[reacl-c-basics.ajax/make-response]].
(response-value rec__3187__auto__)
(response-value data__3188__auto__ v__3189__auto__)
Lens for the value
field from a Response
record. See reacl-c-basics.ajax/make-response
.
Lens for the `value` field from a [[Response]] record. See [[reacl-c-basics.ajax/make-response]].
(response? thing)
Is object a Response
record? See reacl-c-basics.ajax/make-response
.
Is object a `Response` record? See [[reacl-c-basics.ajax/make-response]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close