style(behaviour attrs): unify behaviour declarations

This commit is contained in:
Ilya Averyanov 2021-10-21 14:27:41 +03:00
parent d784e63b9f
commit e37ecc10a6
25 changed files with 28 additions and 28 deletions

View File

@ -16,7 +16,7 @@
-module(emqx_metrics).
-behavior(gen_server).
-behaviour(gen_server).
-include("emqx.hrl").
-include("logger.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_sys_mon).
-behavior(gen_server).
-behaviour(gen_server).
-include("types.hrl").
-include("logger.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_authn_api).
-behavior(minirest_api).
-behaviour(minirest_api).
-include("emqx_authn.hrl").
@ -117,7 +117,7 @@
},
topology => #{
max_overflow => 8,
pool_size => 8
pool_size => 8
},
enable => true})).

View File

@ -16,7 +16,7 @@
-module(emqx_authz_api_mnesia).
-behavior(minirest_api).
-behaviour(minirest_api).
-include("emqx_authz.hrl").
-include_lib("emqx/include/logger.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_authz_api_settings).
-behavior(minirest_api).
-behaviour(minirest_api).
-export([ api_spec/0
, settings/2

View File

@ -16,7 +16,7 @@
-module(emqx_authz_api_sources).
-behavior(minirest_api).
-behaviour(minirest_api).
-include("emqx_authz.hrl").
-include_lib("emqx/include/logger.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_exhook_demo_svr).
-behavior(emqx_exhook_v_1_hook_provider_bhvr).
-behaviour(emqx_exhook_v_1_hook_provider_bhvr).
%%
-export([ start/0

View File

@ -16,7 +16,7 @@
-module(emqx_coap_channel).
-behavior(emqx_gateway_channel).
-behaviour(emqx_gateway_channel).
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx_gateway/src/coap/include/emqx_coap.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_coap_frame).
-behavior(emqx_gateway_frame).
-behaviour(emqx_gateway_frame).
%% emqx_gateway_frame API
-export([ initial_parse_state/1

View File

@ -18,7 +18,7 @@
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
-behavior(emqx_gateway_impl).
-behaviour(emqx_gateway_impl).
%% APIs
-export([ reg/0

View File

@ -19,7 +19,7 @@
-include("include/emqx_gateway.hrl").
-behavior(gen_server).
-behaviour(gen_server).
%% APIs
-export([ reg/2

View File

@ -18,7 +18,7 @@
%% @doc The frame parser for ExProto
-module(emqx_exproto_frame).
-behavior(emqx_gateway_frame).
-behaviour(emqx_gateway_frame).
-export([ initial_parse_state/1
, serialize_opts/0

View File

@ -17,7 +17,7 @@
%% The gRPC server for ConnectionAdapter
-module(emqx_exproto_gsvr).
% -behavior(emqx_exproto_v_1_connection_adapter_bhvr).
% -behaviour(emqx_exproto_v_1_connection_adapter_bhvr).
-include("src/exproto/include/emqx_exproto.hrl").
-include_lib("emqx/include/logger.hrl").

View File

@ -17,7 +17,7 @@
%% @doc The ExProto Gateway Implement interface
-module(emqx_exproto_impl).
-behavior(emqx_gateway_impl).
-behaviour(emqx_gateway_impl).
%% APIs
-export([ reg/0

View File

@ -17,7 +17,7 @@
%% @doc The LwM2M Gateway Implement interface
-module(emqx_lwm2m_impl).
-behavior(emqx_gateway_impl).
-behaviour(emqx_gateway_impl).
%% APIs
-export([ reg/0

View File

@ -16,7 +16,7 @@
-module(emqx_sn_channel).
-behavior(emqx_gateway_channel).
-behaviour(emqx_gateway_channel).
-include("src/mqttsn/include/emqx_sn.hrl").
-include_lib("emqx/include/emqx.hrl").
@ -1042,7 +1042,7 @@ handle_out(connack, ?SN_RC_ACCEPTED,
Channel = #channel{ctx = Ctx, conninfo = ConnInfo}) ->
_ = run_hooks(Ctx, 'client.connack',
[ConnInfo, returncode_name(?SN_RC_ACCEPTED)],
#{}
#{}
),
return_connack(?SN_CONNACK_MSG(?SN_RC_ACCEPTED),
ensure_keepalive(Channel));
@ -1325,7 +1325,7 @@ handle_deliver(Delivers, Channel = #channel{
ctx = Ctx,
conn_state = ConnState,
session = Session,
clientinfo = #{clientid := ClientId}})
clientinfo = #{clientid := ClientId}})
when ConnState =:= disconnected;
ConnState =:= asleep ->
NSession = emqx_session:enqueue(

View File

@ -18,7 +18,7 @@
%% @doc The frame parser for MQTT-SN protocol
-module(emqx_sn_frame).
-behavior(emqx_gateway_frame).
-behaviour(emqx_gateway_frame).
-include("src/mqttsn/include/emqx_sn.hrl").

View File

@ -17,7 +17,7 @@
%% @doc The MQTT-SN Gateway Implement interface
-module(emqx_sn_impl).
-behavior(emqx_gateway_impl).
-behaviour(emqx_gateway_impl).
%% APIs
-export([ reg/0

View File

@ -16,7 +16,7 @@
-module(emqx_stomp_channel).
-behavior(emqx_gateway_channel).
-behaviour(emqx_gateway_channel).
-include("src/stomp/include/emqx_stomp.hrl").
-include_lib("emqx/include/emqx.hrl").

View File

@ -68,7 +68,7 @@
-module(emqx_stomp_frame).
-behavior(emqx_gateway_frame).
-behaviour(emqx_gateway_frame).
-include("src/stomp/include/emqx_stomp.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_stomp_impl).
-behavior(emqx_gateway_impl).
-behaviour(emqx_gateway_impl).
%% APIs
-export([ reg/0

View File

@ -16,7 +16,7 @@
-module(emqx_exproto_echo_svr).
-behavior(emqx_exproto_v_1_connection_handler_bhvr).
-behaviour(emqx_exproto_v_1_connection_handler_bhvr).
-export([ start/0
, stop/1

View File

@ -16,7 +16,7 @@
-module(emqx_delayed_api).
-behavior(minirest_api).
-behaviour(minirest_api).
-include_lib("typerefl/include/types.hrl").

View File

@ -16,7 +16,7 @@
-module(emqx_telemetry_api).
-behavior(minirest_api).
-behaviour(minirest_api).
-import(emqx_mgmt_util, [ schema/1
, object_schema/1

View File

@ -16,7 +16,7 @@
%% TODO: refactor uri path
-module(emqx_topic_metrics_api).
-behavior(minirest_api).
-behaviour(minirest_api).
-import(emqx_mgmt_util, [ properties/1
, schema/1