(emit event)
Returns a function that will emit a transient event of the given
event-type
into a manifold stream.
To be used together with every-ms
, e.g.:
(every-ms 5000 (emit {:everest.event/type 'CheckCondition}))
Returns a function that will emit a transient event of the given `event-type` into a manifold stream. To be used together with `every-ms`, e.g.: (every-ms 5000 (emit {:everest.event/type 'CheckCondition}))
(every-ms period-ms delay-ms f)
Creates a handler that registers the function f
upon startup. It then runs
the function every period-ms
with initial delay-ms
.
f
must accept a manifold stream, which is the stream of events handled by
this handler.
For example, in order to produce a handler which will receive a
CheckCondition
event every 5 seconds, do the following:
(every-ms 5000 0 (emit {:everest.event/type 'CheckCondition}))
Creates a handler that registers the function `f` upon startup. It then runs the function every `period-ms` with initial `delay-ms`. `f` must accept a manifold stream, which is the stream of events handled by this handler. For example, in order to produce a handler which will receive a `CheckCondition` event every 5 seconds, do the following: (every-ms 5000 0 (emit {:everest.event/type 'CheckCondition}))
(handler handler-type & handler-fns)
(on event-type f)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close