Add gen_event behaviour declaration

This makes it easier to see that a module is an event handler.
Furthermore the compiler checks for required callback functions.
This commit is contained in:
David Ansari 2022-09-09 10:14:21 +00:00
parent b953b0f10e
commit 19628af139
4 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,8 @@
-module(rabbit_event_consumer).
-behaviour(gen_event).
-include_lib("rabbit_common/include/rabbit.hrl").
-export([register/4]).

View File

@ -6,6 +6,8 @@
%%
-module(rabbit_quorum_memory_manager).
-behaviour(gen_event).
-include_lib("rabbit_common/include/rabbit.hrl").
-export([init/1, handle_call/2, handle_event/2, handle_info/2,

View File

@ -7,6 +7,8 @@
-module(dummy_event_receiver).
-behaviour(gen_event).
-export([start/3, stop/0]).
-export([init/1, handle_call/2, handle_event/2, handle_info/2,

View File

@ -7,6 +7,8 @@
-module(rabbit_exchange_type_event).
-behaviour(gen_event).
-include_lib("rabbit_common/include/rabbit.hrl").
-include_lib("rabbit_common/include/rabbit_framing.hrl").
-include("rabbit_event_exchange.hrl").