Liking cljdoc? Tell your friends :D

clj-arsenal.stream


streamerclj/s

(streamer handler & {:as opts})

Creates a streamer. Calling the streamer returns a stream reference, which can be watched and derefed like a built-in reference type.

The handler takes the context and all args passed to the streamer call, and should return a map of {::boot boot-fn ::kill ?kill-fn ::snap ?snap-fn ::extra-lives ?extra-lives ::default ?default-value}.

Options are:

  • :flush-signal - a custom signal to trigger flushes
  • :extra-lives - the default number of flushes to go after a stream's watch count reaches zero, before killing it.
Creates a streamer.  Calling the streamer returns a stream reference,
which can be watched and derefed like a built-in reference type.

The `handler` takes the context and all args passed to the streamer call, and should
return a map of `{::boot boot-fn ::kill ?kill-fn ::snap ?snap-fn ::extra-lives ?extra-lives ::default ?default-value}`.

Options are:
- `:flush-signal` - a custom signal to trigger flushes
- `:extra-lives` - the default number of flushes to go after a stream's watch count
   reaches zero, before killing it.
sourceraw docstring

with-extra-contextclj/s

(with-extra-context streamer-ref extra-context)

Returns a new StreamerRef with the given context merged into the current context.

Returns a new StreamerRef with the given context merged into the current context.
sourceraw docstring

with-replace-contextclj/s

(with-replace-context streamer-ref new-context)

Returns a new StreamerRef with the context replaced by the given context.

Returns a new StreamerRef with the context replaced by the given context.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close