gravityblast/traffic

Need an AfterFilter

maddyblue opened this issue · 4 comments

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.

can't you use a middleware like the LoggerMiddleware? https://github.com/pilu/traffic/blob/master/logger_middleware.go

Ah! Didn't notice that in the docs. Yes, that looks like it'll work.

yeah I need to update docs. there are a lot of things not covered.

@mjibson I've just updated the middleware signature, check the logger middleware again please ;)