Liking cljdoc? Tell your friends :D

superlifter.core


add-bucket!clj/s

(add-bucket! context bucket-id opts)
source

Cacheclj/sprotocol

->uraniaclj/s

(->urania this)

urania->clj/s

(urania-> this new-value)
source

default-bucket-idclj/s

source

default-optsclj/s

(default-opts)
source

enqueue!clj/s

(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.
sourceraw docstring

fetch!clj/s

(fetch! context)
(fetch! context bucket-id)

Performs a fetch of all muses in the queue

Performs a fetch of all muses in the queue
sourceraw docstring

fetch-all!clj/s

(fetch-all! context)
source

start!clj/s

(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.
sourceraw docstring

start-trigger!clj/smultimethod

source

stop!clj/s

(stop! context)

Stops superlifter

Stops superlifter
sourceraw docstring

Throwablecljs

source

update-trigger!clj/s

(update-trigger! context bucket-id trigger-kind opts-fn)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close