Need an AfterFilter
maddyblue opened this issue · 4 comments
maddyblue commented
I need a filter that executes both before and after a route has executed. I'm trying to add miniprofiler support to traffic, and so need to run a finalizer to stop some timers.
gravityblast commented
can't you use a middleware like the LoggerMiddleware? https://github.com/pilu/traffic/blob/master/logger_middleware.go
maddyblue commented
Ah! Didn't notice that in the docs. Yes, that looks like it'll work.
gravityblast commented
yeah I need to update docs. there are a lot of things not covered.
gravityblast commented
@mjibson I've just updated the middleware signature, check the logger middleware again please ;)