breaker
breaker copied to clipboard
Accept a listener to notify of breaker status changes.
The basic idea is that you could pass a process that you want to receive status changes from a particular breaker:
user_service = Breaker.new(%{url: "http://example.com/user", notify: other_pid})
When the breaker is tripped, it'll send a message to the process, giving you control over logging or debugging non-trivial network failures.
I'm not sure how useful this kind of thing is yet, sound off with your input!