Skip to content

Commit

Permalink
Implement EredisSub.Handler behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandremcosta committed Jun 11, 2024
1 parent ab31509 commit f45e5d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/eredis_sub/handler.ex
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f45e5d7

Please sign in to comment.