(catch-stream-error & body)catch any errors and put them in a StreamError marker
catch any errors and put them in a StreamError marker
(close-on-closed closeable stream)close a Closeable object (such as an InputStream) when the stream is closed
close a Closeable object (such as an InputStream) when the stream is closed
(divert-stream-errors src)kinda awkward - adapted from connect-via... takes src and returns [err dst]. feeds StreamErrors from src to err, and any other values to dst. closes err and dst when src is exhausted
kinda awkward - adapted from connect-via... takes src and returns [err dst]. feeds StreamErrors from src to err, and any other values to dst. closes err and dst when src is exhausted
(filter-log-stream-errors description source)log 2 exemplars of StreamErrors on the source, and then filter them out
log 2 exemplars of StreamErrors on the source, and then filter them out
(not-stream-error description v)if v is a stream-error, log it and return nil, otherwise return v
if v is a stream-error, log it and return nil, otherwise return v
(reduce-all-throw description f source)(reduce-all-throw description f init source)reduce a stream, but if there are any errors will log exemplars and return an error-deferred with the first error. always reduces the entire stream, as if any errors were filtered
reduce a stream, but if there are any errors will log exemplars and return an error-deferred with the first error. always reduces the entire stream, as if any errors were filtered
(reduce-catch description f source)(reduce-catch description f init source)reduce, but with any errors caught and exemplars logged
reduce, but with any errors caught and exemplars logged
(s-first source)(s-first no-val source)consume a stream completely, returning a Deferred of the first value from the stream, if any. returns Deferred<no-val> if the stream is empty
consume a stream completely, returning a Deferred of the first value from the stream, if any. returns Deferred<no-val> if the stream is empty
(stream-peek stream)(stream-peek stream default-val)peeks the first value from a stream, returning [val new-stream] where val is the first value and new-stream is a new-stream with the same content as the input stream. default-val is returned as the val if the input stream is empty
peeks the first value from a stream, returning [val new-stream] where val is the first value and new-stream is a new-stream with the same content as the input stream. default-val is returned as the val if the input stream is empty
(test-realize-stream v)given a possibly deferred stream, realize it as a Deferred<vector>
given a possibly deferred stream, realize it as a Deferred<vector>
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |