> On Oct 1, 2017, at 9:21 PM, Didier <didi...@gmail.com> wrote: > > I can't emphasize enough the utility of the interceptor chain pattern, as > employed heavily in pedestal. > > Interesting... Its almost like a workflow framework, but for simpler in code > workflows. I'm reluctant to have a dependency on pedestal just for this > though.
The dependencies required are pretty minimal, you just pull in the interceptor stuff by itself. Those guys did a good job of breaking pedestal into reusable pieces. [io.pedestal/pedestal.interceptor "0.5.2"] [io.pedestal/pedestal.log "0.5.2"] [io.dropwizard.metrics/metrics-core "3.1.2"] [org.clojure/core.match "0.3.0-alpha4" :exclusions [[org.clojure/clojurescript] [org.clojure/tools.analyzer.jvm]]] Plus core.async. I've rolled my own mini-interceptor too. If you don't need the "leave" interceptor concept and are happy with one-way execution, we're just talking about pushing functions onto a queue. Each function takes a context map that includes the queue itself. Then, implement an executor that dequeues each function and executes it. Capture any errors at this point and short-circuit execution. Having gone down that route I just ended up using pedestal.interceptor, after reading the source code and realizing it's so simple. I like using other people's heavily debugged code :) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.