ExBreak v0.0.4 ExBreak.Registry View Source
A registry of all running breakers
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Find a breaker, and return an error if it does not exist.
Look up a breaker, and create one if it does not exist.
Link to this section Functions
Link to this function
child_spec(init_arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
find_breaker(key) View Source
Find a breaker, and return an error if it does not exist.
Link to this function
get_breaker(key) View Source
Look up a breaker, and create one if it does not exist.
TODO: get_breaker/1 is a potential bottleneck, because it's the same GenServer call where we lookup all breakers. An ETS table isn't an option right now because we need get-or-create functionality.
Link to this function