finagle-clojure.filter
Wrapper around com.twitter.finagle.Filter
. Filters are like middleware and can be used to add funcionality common to many Services, like instrumentation or backpressure.
Filters are composed with other Filters or Services resulting in a Service. Use and-then
or chain
to compose Filters & Services together.
and-then
(and-then filter next)
Compose a Filter and a Filter or Service together.
Arguments:
filter
: a Filter.next
: a Filter or Service.
Returns:
A new Service that will first send a request through filter
and then pass the result to next
.
See: chain for a higher level interface.
chain
(chain & filters-and-service)