diff --git a/lib/eredis_sub/handler.ex b/lib/eredis_sub/handler.ex new file mode 100644 index 0000000..ce2b3e0 --- /dev/null +++ b/lib/eredis_sub/handler.ex @@ -0,0 +1,12 @@ +defmodule EredisSub.Handler do + @moduledoc """ + Behaviour for handling messages received from Redis. + """ + + @doc """ + Handles a message received from Redis. + Receives a binary message and a metadata that can be customized upon subscription. + Return value is ignored. + """ + @callback handle(binary, term) :: term +end