Good Evening All,
I’m trying to figure out a way to create a simple inline event broadcaster adapter for a GenStage system that uses a BroadcastDispatcher.
In my test suite, I’d really love to be able to test against something as simple as:
defmodule InlineAdapter do
def sync_notify(event) do
Enum.each(magically_find_consumer_modules(), fn(consumer) ->
consumer.handle_event(event)
end)
end
end
In dev/production, the adapter implementation would be like the example: https://github.com/elixir-lang/gen_stage/blob/master/examples/gen_event.exs#L31
So the issue is, how do I implement magically_find_consumer_modules()
?
Or is there another way I should be going about this?
Thanks!
Benjamin