Home Ask Login Register

Developers Planet

Your answer is one click away!

Roland February 2016

Intercept function call

I have built a "sidecar" to my micro services, to perform common monitoring and logging services.

So, i have the sidecar library that basically works by the "template method" pattern and I have a ring middleware that wrapps the calls to my services through the sidecar and it works... But i would like to remove the dependency on ring.

So, my question: Is there a way to intercept the calls from ring to my API-functions and wrapp it without adding knowledge to neither ring or my API. Simply put, intercept calls to a random named function and replace it with my own.

Answers


ebaxt February 2016

I believe you can use https://github.com/technomancy/robert-hooke to do this

Post Status

Asked in February 2016
Viewed 1,499 times
Voted 4
Answered 1 times

Search




Leave an answer


Quote of the day: live life