(enqueue! context muse)
(enqueue! context bucket-id muse)
Enqueues a muse describing work to be done and returns a promise which will be delivered with the result of the work. The muses in the queue will all be fetched together when a trigger condition is met.
Enqueues a muse describing work to be done and returns a promise which will be delivered with the result of the work. The muses in the queue will all be fetched together when a trigger condition is met.
(fetch! context)
(fetch! context bucket-id)
Performs a fetch of all muses in the queue
Performs a fetch of all muses in the queue
(start! opts)
Starts a superlifter with the supplied options, which can contain:
:buckets {:default bucket-opts :my-bucket bucket-opts ...}
:urania-opts The options map supplied to urania for running muses. Contains :env, :cache and :executor :cache must implement the Cache protocol See urania documentation for details
The :default
bucket is used for all activity not associated with a named bucket.
Bucket options can contain the following:
:triggers Conditions to perform a fetch of all muses in the queue. Triggers is a map of trigger-kind to trigger, looking like:
{:queue-size {:threshold 10}
:interval {:interval 100}
The fetch will be performed whenever any single trigger condition is met.
Triggers can be of several types:
Queue size trigger, which performs the fetch when the queue reaches n items
{:queue-size {:threshold n}}
Interval trigger, which performs the fetch every n milliseconds
{:interval {:interval n}}
If no triggers are supplied, superlifter runs in 'manual' mode and fetches will only be performed when you call `fetch!`
You can supply your own trigger definition by participating in the `start-trigger!` multimethod.
:urania-opts Override the top-level urania-opts at the bucket level
Returns a context which can be used to stop superlifter, enqueue muses and trigger fetches.
Starts a superlifter with the supplied options, which can contain: :buckets {:default bucket-opts :my-bucket bucket-opts ...} :urania-opts The options map supplied to urania for running muses. Contains :env, :cache and :executor :cache must implement the Cache protocol See urania documentation for details The `:default` bucket is used for all activity not associated with a named bucket. Bucket options can contain the following: :triggers Conditions to perform a fetch of all muses in the queue. Triggers is a map of trigger-kind to trigger, looking like: {:queue-size {:threshold 10} :interval {:interval 100} The fetch will be performed whenever any single trigger condition is met. Triggers can be of several types: Queue size trigger, which performs the fetch when the queue reaches n items {:queue-size {:threshold n}} Interval trigger, which performs the fetch every n milliseconds {:interval {:interval n}} If no triggers are supplied, superlifter runs in 'manual' mode and fetches will only be performed when you call `fetch!` You can supply your own trigger definition by participating in the `start-trigger!` multimethod. :urania-opts Override the top-level urania-opts at the bucket level Returns a context which can be used to stop superlifter, enqueue muses and trigger fetches.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close