Skip to content

Commit

Permalink
Document handle_info/2 (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga authored Nov 12, 2024
1 parent 625b89f commit 4776530
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/db_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,15 @@ defmodule DBConnection do
"""
@callback disconnect(err :: Exception.t(), state :: any) :: :ok

@doc """
Optional callback for handling messages received by the connection.
Returns `{:disconnect, exception}` to close the connection or `:ok` to continue.
"""
@callback handle_info(message :: any, state :: any) :: {:disconnect, Exception.t()} | :ok

@optional_callbacks handle_info: 2

@connection_module_key :connection_module

@doc """
Expand Down

0 comments on commit 4776530

Please sign in to comment.