Merge pull request #7038 from zmstone/chore-rename-emqx-no-space-source-code

chore: EMQ X -> EMQX in source code
This commit is contained in:
Zaiming (Stone) Shi 2022-02-17 21:13:43 +01:00 committed by GitHub
commit 2a6d11c7f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 77 additions and 77 deletions

View File

@ -14,8 +14,8 @@
%% limitations under the License. %% limitations under the License.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-ifndef(EMQ_X_HRL). -ifndef(EMQX_HRL).
-define(EMQ_X_HRL, true). -define(EMQX_HRL, true).
%% Shard %% Shard
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------

View File

@ -14,8 +14,8 @@
%% limitations under the License. %% limitations under the License.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-ifndef(EMQ_X_MQTT_HRL). -ifndef(EMQX_MQTT_HRL).
-define(EMQ_X_MQTT_HRL, true). -define(EMQX_MQTT_HRL, true).
-define(UINT_MAX, 16#FFFFFFFF). -define(UINT_MAX, 16#FFFFFFFF).

View File

@ -14,8 +14,8 @@
%% limitations under the License. %% limitations under the License.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-ifndef(EMQ_X_PLACEHOLDER_HRL). -ifndef(EMQX_PLACEHOLDER_HRL).
-define(EMQ_X_PLACEHOLDER_HRL, true). -define(EMQX_PLACEHOLDER_HRL, true).
-define(PH(Type), <<"${", Type/binary, "}">> ). -define(PH(Type), <<"${", Type/binary, "}">> ).

View File

@ -25,15 +25,15 @@
-include("emqx_release.hrl"). -include("emqx_release.hrl").
%% @doc Return EMQ X description. %% @doc Return EMQX description.
description() -> description() ->
case os:getenv("EMQX_DESCRIPTION") of case os:getenv("EMQX_DESCRIPTION") of
false -> "EMQ X Community Edition"; false -> "EMQX Community Edition";
"" -> "EMQ X Community Edition"; "" -> "EMQX Community Edition";
Str -> string:strip(Str, both, $\n) Str -> string:strip(Str, both, $\n)
end. end.
%% @doc Return EMQ X edition info. %% @doc Return EMQX edition info.
%% Read info from persistent_term at runtime. %% Read info from persistent_term at runtime.
%% Or meck this function to run tests for another eidtion. %% Or meck this function to run tests for another eidtion.
-spec edition() -> ce | ee | edge. -spec edition() -> ce | ee | edge.
@ -41,7 +41,7 @@ edition() ->
try persistent_term:get(emqx_edition) try persistent_term:get(emqx_edition)
catch error : badarg -> get_edition() end. catch error : badarg -> get_edition() end.
%% @private initiate EMQ X edition info in persistent_term. %% @private initiate EMQX edition info in persistent_term.
put_edition() -> put_edition() ->
ok = put_edition(get_edition()). ok = put_edition(get_edition()).

View File

@ -119,7 +119,7 @@ For per-listener overrides see <code>authentication</code>
in listener configs in listener configs
<br> <br>
<br> <br>
EMQ X can be configured with: EMQX can be configured with:
<br> <br>
<ul> <ul>
<li><code>[]</code>: The default value, it allows *ALL* logins</li> <li><code>[]</code>: The default value, it allows *ALL* logins</li>
@ -134,7 +134,7 @@ per the configured order, until an 'allow' or 'deny' decision can be made.
If there is no decision after a full chain exhaustion, the login is rejected. If there is no decision after a full chain exhaustion, the login is rejected.
""")} """)}
%% NOTE: authorization schema here is only to keep emqx app prue %% NOTE: authorization schema here is only to keep emqx app prue
%% the full schema for EMQ X node is injected in emqx_conf_schema. %% the full schema for EMQX node is injected in emqx_conf_schema.
, {"authorization", , {"authorization",
sc(ref("authorization"), sc(ref("authorization"),
#{})} #{})}
@ -1200,7 +1200,7 @@ common_ssl_opts_schema(Defaults) ->
"""Trusted PEM format CA certificates bundle file.<br> """Trusted PEM format CA certificates bundle file.<br>
The certificates in this file are used to verify the TLS peer's certificates. The certificates in this file are used to verify the TLS peer's certificates.
Append new certificates to the file if new CAs are to be trusted. Append new certificates to the file if new CAs are to be trusted.
There is no need to restart EMQ X to have the updated file loaded, because There is no need to restart EMQX to have the updated file loaded, because
the system regularly checks if file has been updated (and reload).<br> the system regularly checks if file has been updated (and reload).<br>
NOTE: invalidating (deleting) a certificate from the file will not affect NOTE: invalidating (deleting) a certificate from the file will not affect
already established connections. already established connections.
@ -1400,7 +1400,7 @@ Selecting a good cipher suite is critical for the
application's data security, confidentiality and performance. application's data security, confidentiality and performance.
The names should be in OpenSSL string format (not RFC format). The names should be in OpenSSL string format (not RFC format).
All default values and examples provided by EMQ X config All default values and examples provided by EMQX config
documentation are all in OpenSSL format.<br> documentation are all in OpenSSL format.<br>
NOTE: Certain cipher suites are only compatible with NOTE: Certain cipher suites are only compatible with

View File

@ -14,7 +14,7 @@
%% limitations under the License. %% limitations under the License.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% The proper types extension for EMQ X %% The proper types extension for EMQX
-module(emqx_proper_types). -module(emqx_proper_types).

View File

@ -48,7 +48,7 @@ config_refs(Modules) ->
%% authn is a core functionality however implemented outside of emqx app %% authn is a core functionality however implemented outside of emqx app
%% in emqx_schema, 'authentication' is a map() type which is to allow %% in emqx_schema, 'authentication' is a map() type which is to allow
%% EMQ X more pluggable. %% EMQX more pluggable.
root_type() -> root_type() ->
hoconsc:array(authenticator_type()). hoconsc:array(authenticator_type()).

View File

@ -96,11 +96,11 @@ fields(file) ->
, {path, #{type => string(), , {path, #{type => string(),
desc => """ desc => """
Path to the file which contains the ACL rules.<br> Path to the file which contains the ACL rules.<br>
If the file provisioned before starting EMQ X node, If the file provisioned before starting EMQX node,
it can be placed anywhere as long as EMQ X has read access to it. it can be placed anywhere as long as EMQX has read access to it.
In case the rule-set is created from EMQ X dashboard or management API, In case the rule-set is created from EMQX dashboard or management API,
the file will be placed in `authz` sub directory inside EMQ X's `data_dir`, the file will be placed in `authz` sub directory inside EMQX's `data_dir`,
and the new rules will override all rules from the old config file. and the new rules will override all rules from the old config file.
""" """
}} }}

View File

@ -1,6 +1,6 @@
-ifndef(EMQ_X_CONF_HRL). -ifndef(EMQX_CONF_HRL).
-define(EMQ_X_CONF_HRL, true). -define(EMQX_CONF_HRL, true).
-define(CLUSTER_RPC_SHARD, emqx_cluster_rpc_shard). -define(CLUSTER_RPC_SHARD, emqx_cluster_rpc_shard).

View File

@ -140,7 +140,7 @@ dump_schema(Dir) ->
-spec gen_doc(file:name_all()) -> ok. -spec gen_doc(file:name_all()) -> ok.
gen_doc(File) -> gen_doc(File) ->
Version = emqx_release:version(), Version = emqx_release:version(),
Title = "# EMQ X " ++ Version ++ " Configuration", Title = "# EMQX " ++ Version ++ " Configuration",
BodyFile = filename:join([code:lib_dir(emqx_conf), "etc", "emqx_conf.md"]), BodyFile = filename:join([code:lib_dir(emqx_conf), "etc", "emqx_conf.md"]),
{ok, Body} = file:read_file(BodyFile), {ok, Body} = file:read_file(BodyFile),
Doc = hocon_schema_md:gen(emqx_conf_schema, #{title => Title, body => Body}), Doc = hocon_schema_md:gen(emqx_conf_schema, #{title => Title, body => Body}),

View File

@ -41,7 +41,7 @@
%% Static apps which merge their configs into the merged emqx.conf %% Static apps which merge their configs into the merged emqx.conf
%% The list can not be made a dynamic read at run-time as it is used %% The list can not be made a dynamic read at run-time as it is used
%% by nodetool to generate app.<time>.config before EMQ X is started %% by nodetool to generate app.<time>.config before EMQX is started
-define(MERGED_CONFIGS, -define(MERGED_CONFIGS,
[ emqx_bridge_schema [ emqx_bridge_schema
, emqx_retainer_schema , emqx_retainer_schema
@ -78,7 +78,7 @@ roots() ->
})} })}
, {"cluster", , {"cluster",
sc(hoconsc:ref("cluster"), sc(hoconsc:ref("cluster"),
#{ desc => "EMQ X nodes can form a cluster to scale up the total capacity.<br>" #{ desc => "EMQX nodes can form a cluster to scale up the total capacity.<br>"
"Here holds the configs to instruct how individual nodes " "Here holds the configs to instruct how individual nodes "
"can discover each other." "can discover each other."
})} })}
@ -89,7 +89,7 @@ roots() ->
})} })}
, {"rpc", , {"rpc",
sc(hoconsc:ref("rpc"), sc(hoconsc:ref("rpc"),
#{ desc => "EMQ X uses a library called <code>gen_rpc</code> for " #{ desc => "EMQX uses a library called <code>gen_rpc</code> for "
"inter-broker communication.<br/>Most of the time the default config " "inter-broker communication.<br/>Most of the time the default config "
"should work, but in case you need to do performance " "should work, but in case you need to do performance "
"fine-turning or experiment a bit, this is where to look." "fine-turning or experiment a bit, this is where to look."
@ -916,13 +916,13 @@ emqx_schema_high_prio_roots() ->
sc(hoconsc:ref("authorization"), sc(hoconsc:ref("authorization"),
#{ desc => """ #{ desc => """
Authorization a.k.a ACL.<br> Authorization a.k.a ACL.<br>
In EMQ X, MQTT client access control is extremely flexible.<br> In EMQX, MQTT client access control is extremely flexible.<br>
An out of the box set of authorization data sources are supported. An out of the box set of authorization data sources are supported.
For example,<br> For example,<br>
'file' source is to support concise and yet generic ACL rules in a file;<br> 'file' source is to support concise and yet generic ACL rules in a file;<br>
'built-in-database' source can be used to store per-client customizable rule sets, 'built-in-database' source can be used to store per-client customizable rule sets,
natively in the EMQ X node;<br> natively in the EMQX node;<br>
'http' source to make EMQ X call an external HTTP API to make the decision;<br> 'http' source to make EMQX call an external HTTP API to make the decision;<br>
'PostgreSQL' etc. to look up clients or rules from external databases;<br> 'PostgreSQL' etc. to look up clients or rules from external databases;<br>
""" })}, """ })},
lists:keyreplace("authorization", 1, Roots, Authz). lists:keyreplace("authorization", 1, Roots, Authz).

View File

@ -40,7 +40,7 @@ start_listeners() ->
Authorization = {?MODULE, authorize}, Authorization = {?MODULE, authorize},
GlobalSpec = #{ GlobalSpec = #{
openapi => "3.0.0", openapi => "3.0.0",
info => #{title => "EMQ X API", version => "5.0.0"}, info => #{title => "EMQX API", version => "5.0.0"},
servers => [#{url => ?BASE_PATH}], servers => [#{url => ?BASE_PATH}],
components => #{ components => #{
schemas => #{}, schemas => #{},

View File

@ -101,7 +101,7 @@ do_sign(Username, Password) ->
<<"alg">> => <<"HS256">> <<"alg">> => <<"HS256">>
}, },
JWT = #{ JWT = #{
<<"iss">> => <<"EMQ X">>, <<"iss">> => <<"EMQX">>,
<<"exp">> => ExpTime <<"exp">> => ExpTime
}, },
Signed = jose_jwt:sign(JWK, JWS, JWT), Signed = jose_jwt:sign(JWK, JWS, JWT),

View File

@ -739,7 +739,7 @@ common_client_props() ->
"packet">>})} "packet">>})}
, {recv_oct, , {recv_oct,
mk(integer(), mk(integer(),
#{ desc => <<"Number of bytes received by EMQ X Broker">>})} #{ desc => <<"Number of bytes received by EMQX Broker">>})}
, {recv_cnt, , {recv_cnt,
mk(integer(), mk(integer(),
#{ desc => <<"Number of socket packets received">>})} #{ desc => <<"Number of socket packets received">>})}

View File

@ -207,7 +207,7 @@ The indicator can be set to:
, desc => , desc =>
"The Default QoS Level indicator for publish request.<br> "The Default QoS Level indicator for publish request.<br>
This option specifies the QoS level for the CoAP Client when publishing a This option specifies the QoS level for the CoAP Client when publishing a
message to EMQ X PUB/SUB system, if the publish request is not carried `qos` message to EMQX PUB/SUB system, if the publish request is not carried `qos`
option. The indicator can be set to: option. The indicator can be set to:
- qos0, qos1, qos2: Fixed default QoS level - qos0, qos1, qos2: Fixed default QoS level
- coap: Dynamic QoS level by the message type of publish request - coap: Dynamic QoS level by the message type of publish request
@ -255,7 +255,7 @@ beyond this time window are temporarily stored in memory."
sc(hoconsc:union([always, contains_object_list]), sc(hoconsc:union([always, contains_object_list]),
#{ default => "contains_object_list" #{ default => "contains_object_list"
, desc => , desc =>
"Policy for publishing UPDATE event message to EMQ X.<br> "Policy for publishing UPDATE event message to EMQX.<br>
- always: send update events as long as the UPDATE request is received. - always: send update events as long as the UPDATE request is received.
- contains_object_list: send update events only if the UPDATE request carries any Object List." - contains_object_list: send update events only if the UPDATE request carries any Object List."
})} })}

View File

@ -26,7 +26,7 @@
-include_lib("emqx/include/logger.hrl"). -include_lib("emqx/include/logger.hrl").
%% @doc EMQ X boot entrypoint. %% @doc EMQX boot entrypoint.
start() -> start() ->
case os:type() of case os:type() of
{win32, nt} -> ok; {win32, nt} -> ok;

View File

@ -38,7 +38,7 @@ schema("/alarms") ->
#{ #{
'operationId' => alarms, 'operationId' => alarms,
get => #{ get => #{
description => <<"EMQ X alarms">>, description => <<"EMQX alarms">>,
parameters => [ parameters => [
hoconsc:ref(emqx_dashboard_swagger, page), hoconsc:ref(emqx_dashboard_swagger, page),
hoconsc:ref(emqx_dashboard_swagger, limit), hoconsc:ref(emqx_dashboard_swagger, limit),

View File

@ -324,7 +324,7 @@ fields(client) ->
{'recv_msg.qos2', hoconsc:mk(integer(), #{desc => {'recv_msg.qos2', hoconsc:mk(integer(), #{desc =>
<<"Number of PUBLISH QoS2 packets received">>})}, <<"Number of PUBLISH QoS2 packets received">>})},
{recv_oct, hoconsc:mk(integer(), #{desc => {recv_oct, hoconsc:mk(integer(), #{desc =>
<<"Number of bytes received by EMQ X Broker (the same below)">>})}, <<"Number of bytes received by EMQX Broker (the same below)">>})},
{recv_pkt, hoconsc:mk(integer(), #{desc => <<"Number of MQTT packets received">>})}, {recv_pkt, hoconsc:mk(integer(), #{desc => <<"Number of MQTT packets received">>})},
{reductions, hoconsc:mk(integer(), #{desc => <<"Erlang reduction">>})}, {reductions, hoconsc:mk(integer(), #{desc => <<"Erlang reduction">>})},
{send_cnt, hoconsc:mk(integer(), #{desc => <<"Number of TCP packets sent">>})}, {send_cnt, hoconsc:mk(integer(), #{desc => <<"Number of TCP packets sent">>})},

View File

@ -48,8 +48,8 @@ properties() ->
[ [
{'actions.failure', integer, <<"Number of failure executions of the rule engine action">>}, {'actions.failure', integer, <<"Number of failure executions of the rule engine action">>},
{'actions.success', integer, <<"Number of successful executions of the rule engine action">>}, {'actions.success', integer, <<"Number of successful executions of the rule engine action">>},
{'bytes.received', integer, <<"Number of bytes received by EMQ X Broker">>}, {'bytes.received', integer, <<"Number of bytes received by EMQX Broker">>},
{'bytes.sent', integer, <<"Number of bytes sent by EMQ X Broker on this connection">>}, {'bytes.sent', integer, <<"Number of bytes sent by EMQX Broker on this connection">>},
{'client.auth.anonymous', integer, <<"Number of clients who log in anonymously">>}, {'client.auth.anonymous', integer, <<"Number of clients who log in anonymously">>},
{'client.authenticate', integer, <<"Number of client authentications">>}, {'client.authenticate', integer, <<"Number of client authentications">>},
{'client.check_authz', integer, <<"Number of Authorization rule checks">>}, {'client.check_authz', integer, <<"Number of Authorization rule checks">>},
@ -66,9 +66,9 @@ properties() ->
{'delivery.dropped.queue_full', integer, <<"Number of messages with a non-zero QoS that were dropped because the message queue was full when sending">>}, {'delivery.dropped.queue_full', integer, <<"Number of messages with a non-zero QoS that were dropped because the message queue was full when sending">>},
{'delivery.dropped.too_large', integer, <<"The number of messages that were dropped because the length exceeded the limit when sending">>}, {'delivery.dropped.too_large', integer, <<"The number of messages that were dropped because the length exceeded the limit when sending">>},
{'messages.acked', integer, <<"Number of received PUBACK and PUBREC packet">>}, {'messages.acked', integer, <<"Number of received PUBACK and PUBREC packet">>},
{'messages.delayed', integer, <<"Number of delay- published messages stored by EMQ X Broker">>}, {'messages.delayed', integer, <<"Number of delay- published messages stored by EMQX Broker">>},
{'messages.delivered', integer, <<"Number of messages forwarded to the subscription process internally by EMQ X Broker">>}, {'messages.delivered', integer, <<"Number of messages forwarded to the subscription process internally by EMQX Broker">>},
{'messages.dropped', integer, <<"Total number of messages dropped by EMQ X Broker before forwarding to the subscription process">>}, {'messages.dropped', integer, <<"Total number of messages dropped by EMQX Broker before forwarding to the subscription process">>},
{'messages.dropped.await_pubrel_timeout', integer, <<"Number of messages dropped due to waiting PUBREL timeout">>}, {'messages.dropped.await_pubrel_timeout', integer, <<"Number of messages dropped due to waiting PUBREL timeout">>},
{'messages.dropped.no_subscribers', integer, <<"Number of messages dropped due to no subscribers">>}, {'messages.dropped.no_subscribers', integer, <<"Number of messages dropped due to no subscribers">>},
{'messages.forward', integer, <<"Number of messages forwarded to other nodes">>}, {'messages.forward', integer, <<"Number of messages forwarded to other nodes">>},
@ -80,7 +80,7 @@ properties() ->
{'messages.qos2.received', integer, <<"Number of QoS 2 messages received from clients">>}, {'messages.qos2.received', integer, <<"Number of QoS 2 messages received from clients">>},
{'messages.qos2.sent', integer, <<"Number of QoS 2 messages sent to clients">>}, {'messages.qos2.sent', integer, <<"Number of QoS 2 messages sent to clients">>},
{'messages.received', integer, <<"Number of messages received from the client, equal to the sum of messages.qos0.received\fmessages.qos1.received and messages.qos2.received">>}, {'messages.received', integer, <<"Number of messages received from the client, equal to the sum of messages.qos0.received\fmessages.qos1.received and messages.qos2.received">>},
{'messages.retained', integer, <<"Number of retained messages stored by EMQ X Broker">>}, {'messages.retained', integer, <<"Number of retained messages stored by EMQX Broker">>},
{'messages.sent', integer, <<"Number of messages sent to the client, equal to the sum of messages.qos0.sent\fmessages.qos1.sent and messages.qos2.sent">>}, {'messages.sent', integer, <<"Number of messages sent to the client, equal to the sum of messages.qos0.sent\fmessages.qos1.sent and messages.qos2.sent">>},
{'packets.auth.received', integer, <<"Number of received AUTH packet">>}, {'packets.auth.received', integer, <<"Number of received AUTH packet">>},
{'packets.auth.sent', integer, <<"Number of sent AUTH packet">>}, {'packets.auth.sent', integer, <<"Number of sent AUTH packet">>},
@ -133,7 +133,7 @@ properties() ->
metrics_api() -> metrics_api() ->
Metadata = #{ Metadata = #{
get => #{ get => #{
description => <<"EMQ X metrics">>, description => <<"EMQX metrics">>,
parameters => [#{ parameters => [#{
name => aggregate, name => aggregate,
in => query, in => query,

View File

@ -53,14 +53,14 @@ properties() ->
{memory_total, string, <<"VM allocated system memory">>}, {memory_total, string, <<"VM allocated system memory">>},
{memory_used, string, <<"VM occupied system memory">>}, {memory_used, string, <<"VM occupied system memory">>},
{node_status, string, <<"Node status">>}, {node_status, string, <<"Node status">>},
{otp_release, string, <<"Erlang/OTP version used by EMQ X Broker">>}, {otp_release, string, <<"Erlang/OTP version used by EMQX Broker">>},
{process_available, integer, <<"Number of available processes">>}, {process_available, integer, <<"Number of available processes">>},
{process_used, integer, <<"Number of used processes">>}, {process_used, integer, <<"Number of used processes">>},
{uptime, integer, <<"EMQ X Broker runtime, millisecond">>}, {uptime, integer, <<"EMQX Broker runtime, millisecond">>},
{version, string, <<"EMQ X Broker version">>}, {version, string, <<"EMQX Broker version">>},
{sys_path, string, <<"EMQ X system file location">>}, {sys_path, string, <<"EMQX system file location">>},
{log_path, string, <<"EMQ X log file location">>}, {log_path, string, <<"EMQX log file location">>},
{config_path, string, <<"EMQ X config file location">>}, {config_path, string, <<"EMQX config file location">>},
{role, string, <<"Node role">>} {role, string, <<"Node role">>}
]). ]).
@ -76,9 +76,9 @@ parameters() ->
nodes_api() -> nodes_api() ->
Metadata = #{ Metadata = #{
get => #{ get => #{
description => <<"List EMQ X nodes">>, description => <<"List EMQX nodes">>,
responses => #{ responses => #{
<<"200">> => object_array_schema(properties(), <<"List EMQ X Nodes">>) <<"200">> => object_array_schema(properties(), <<"List EMQX Nodes">>)
} }
} }
}, },
@ -91,7 +91,7 @@ node_api() ->
parameters => parameters(), parameters => parameters(),
responses => #{ responses => #{
<<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']), <<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']),
<<"200">> => object_schema(properties(), <<"Get EMQ X Nodes info by name">>)}}}, <<"200">> => object_schema(properties(), <<"Get EMQX Nodes info by name">>)}}},
{"/nodes/:node_name", Metadata, node}. {"/nodes/:node_name", Metadata, node}.
node_metrics_api() -> node_metrics_api() ->
@ -102,7 +102,7 @@ node_metrics_api() ->
responses => #{ responses => #{
<<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']), <<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']),
%% TODO: Node Metrics Schema %% TODO: Node Metrics Schema
<<"200">> => schema(metrics, <<"Get EMQ X Node Metrics">>)}}}, <<"200">> => schema(metrics, <<"Get EMQX Node Metrics">>)}}},
{"/nodes/:node_name/metrics", Metadata, node_metrics}. {"/nodes/:node_name/metrics", Metadata, node_metrics}.
node_stats_api() -> node_stats_api() ->
@ -113,7 +113,7 @@ node_stats_api() ->
responses => #{ responses => #{
<<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']), <<"400">> => error_schema(<<"Node error">>, ['SOURCE_ERROR']),
%% TODO: Node Stats Schema %% TODO: Node Stats Schema
<<"200">> => schema(stat, <<"Get EMQ X Node Stats">>)}}}, <<"200">> => schema(stat, <<"Get EMQX Node Stats">>)}}},
{"/nodes/:node_name/stats", Metadata, node_stats}. {"/nodes/:node_name/stats", Metadata, node_stats}.
%%%============================================================================================== %%%==============================================================================================

View File

@ -52,7 +52,7 @@ properties() ->
routes_api() -> routes_api() ->
Metadata = #{ Metadata = #{
get => #{ get => #{
description => <<"EMQ X routes">>, description => <<"EMQX routes">>,
parameters => [topic_param(query) , node_param()] ++ page_params(), parameters => [topic_param(query) , node_param()] ++ page_params(),
responses => #{ responses => #{
<<"200">> => object_array_schema(properties(), <<"List route info">>), <<"200">> => object_array_schema(properties(), <<"List route info">>),
@ -65,7 +65,7 @@ routes_api() ->
route_api() -> route_api() ->
Metadata = #{ Metadata = #{
get => #{ get => #{
description => <<"EMQ X routes">>, description => <<"EMQX routes">>,
parameters => [topic_param(path)], parameters => [topic_param(path)],
responses => #{ responses => #{
<<"200">> => <<"200">> =>

View File

@ -42,7 +42,7 @@ paths() ->
schema("/stats") -> schema("/stats") ->
#{ 'operationId' => list #{ 'operationId' => list
, get => , get =>
#{ description => <<"EMQ X stats">> #{ description => <<"EMQX stats">>
, tags => [<<"stats">>] , tags => [<<"stats">>]
, parameters => [ref(aggregate)] , parameters => [ref(aggregate)]
, responses => , responses =>

View File

@ -85,13 +85,13 @@ fields(status) ->
fields(telemetry) -> fields(telemetry) ->
[ { emqx_version [ { emqx_version
, mk( string() , mk( string()
, #{ desc => <<"EMQ X Version">> , #{ desc => <<"EMQX Version">>
, example => <<"5.0.0-beta.3-32d1547c">> , example => <<"5.0.0-beta.3-32d1547c">>
}) })
} }
, { license , { license
, mk( map() , mk( map()
, #{ desc => <<"EMQ X License">> , #{ desc => <<"EMQX License">>
, example => #{edition => <<"community">>} , example => #{edition => <<"community">>}
}) })
} }
@ -115,50 +115,50 @@ fields(telemetry) ->
} }
, { up_time , { up_time
, mk( integer() , mk( integer()
, #{ desc => <<"EMQ X Runtime">> , #{ desc => <<"EMQX Runtime">>
, example => 20220113 , example => 20220113
}) })
} }
, { uuid , { uuid
, mk( string() , mk( string()
, #{ desc => <<"EMQ X UUID">> , #{ desc => <<"EMQX UUID">>
, example => <<"AAAAAAAA-BBBB-CCCC-2022-DDDDEEEEFFF">> , example => <<"AAAAAAAA-BBBB-CCCC-2022-DDDDEEEEFFF">>
}) })
} }
, { nodes_uuid , { nodes_uuid
, mk( array(binary()) , mk( array(binary())
, #{ desc => <<"EMQ X Cluster Nodes UUID">> , #{ desc => <<"EMQX Cluster Nodes UUID">>
, example => [ <<"AAAAAAAA-BBBB-CCCC-2022-DDDDEEEEFFF">> , example => [ <<"AAAAAAAA-BBBB-CCCC-2022-DDDDEEEEFFF">>
, <<"ZZZZZZZZ-CCCC-BBBB-2022-DDDDEEEEFFF">>] , <<"ZZZZZZZZ-CCCC-BBBB-2022-DDDDEEEEFFF">>]
}) })
} }
, { active_plugins , { active_plugins
, mk( array(binary()) , mk( array(binary())
, #{ desc => <<"EMQ X Active Plugins">> , #{ desc => <<"EMQX Active Plugins">>
, example => [<<"Plugin A">>, <<"Plugin B">>] , example => [<<"Plugin A">>, <<"Plugin B">>]
}) })
} }
, { active_modules , { active_modules
, mk( array(binary()) , mk( array(binary())
, #{ desc => <<"EMQ X Active Modules">> , #{ desc => <<"EMQX Active Modules">>
, example => [<<"Module A">>, <<"Module B">>] , example => [<<"Module A">>, <<"Module B">>]
}) })
} }
, { num_clients , { num_clients
, mk( integer() , mk( integer()
, #{ desc => <<"EMQ X Current Connections">> , #{ desc => <<"EMQX Current Connections">>
, example => 20220113 , example => 20220113
}) })
} }
, { messages_received , { messages_received
, mk( integer() , mk( integer()
, #{ desc => <<"EMQ X Current Received Message">> , #{ desc => <<"EMQX Current Received Message">>
, example => 2022 , example => 2022
}) })
} }
, { messages_sent , { messages_sent
, mk( integer() , mk( integer()
, #{ desc => <<"EMQ X Current Sent Message">> , #{ desc => <<"EMQX Current Sent Message">>
, example => 2022 , example => 2022
}) })
} }

View File

@ -45,7 +45,7 @@
%% %%
%% For SSL files in the input Option, it can either be a file path %% For SSL files in the input Option, it can either be a file path
%% or a map like `#{filename := FileName, file := Content}`. %% or a map like `#{filename := FileName, file := Content}`.
%% In case it's a map, the file is saved in EMQ X's `data_dir' %% In case it's a map, the file is saved in EMQX's `data_dir'
%% (unless `SubDir' is an absolute path). %% (unless `SubDir' is an absolute path).
%% NOTE: This function is now deprecated, use emqx_tls_lib:ensure_ssl_files/2 instead. %% NOTE: This function is now deprecated, use emqx_tls_lib:ensure_ssl_files/2 instead.
-spec save_files_return_opts(opts_input(), atom() | string() | binary(), -spec save_files_return_opts(opts_input(), atom() | string() | binary(),
@ -60,7 +60,7 @@ save_files_return_opts(Options, SubDir, ResId) ->
%% %%
%% For SSL files in the input Option, it can either be a file path %% For SSL files in the input Option, it can either be a file path
%% or a map like `#{filename := FileName, file := Content}`. %% or a map like `#{filename := FileName, file := Content}`.
%% In case it's a map, the file is saved in EMQ X's `data_dir' %% In case it's a map, the file is saved in EMQX's `data_dir'
%% (unless `SubDir' is an absolute path). %% (unless `SubDir' is an absolute path).
%% NOTE: This function is now deprecated, use emqx_tls_lib:ensure_ssl_files/2 instead. %% NOTE: This function is now deprecated, use emqx_tls_lib:ensure_ssl_files/2 instead.
-spec save_files_return_opts(opts_input(), file:name_all()) -> opts(). -spec save_files_return_opts(opts_input(), file:name_all()) -> opts().

View File

@ -33,9 +33,9 @@ roots() -> [?CONF_ROOT].
fields(?CONF_ROOT) -> fields(?CONF_ROOT) ->
#{fields => root_fields(), #{fields => root_fields(),
desc => """ desc => """
Manage EMQ X plugins. Manage EMQX plugins.
<br> <br>
Plugins can be pre-built as a part of EMQ X package, Plugins can be pre-built as a part of EMQX package,
or installed as a standalone package in a location specified by or installed as a standalone package in a location specified by
<code>install_dir</code> config key <code>install_dir</code> config key
<br> <br>
@ -85,5 +85,5 @@ The plugin beam files and configuration files should reside in
the sub-directory named as <code>emqx_foo_bar-0.1.0</code>. the sub-directory named as <code>emqx_foo_bar-0.1.0</code>.
<br> <br>
NOTE: For security reasons, this directory should **NOT** be writable NOTE: For security reasons, this directory should **NOT** be writable
by anyone expect for <code>emqx</code> (or any user which runs EMQ X) by anyone expect for <code>emqx</code> (or any user which runs EMQX)
""". """.

View File

@ -1,7 +1,7 @@
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%% %%
%% @doc EMQ X License Management Application. %% @doc EMQX License Management Application.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_license_app). -module(emqx_license_app).

View File

@ -1,7 +1,7 @@
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%% %%
%% @doc EMQ X License Management. %% @doc EMQX License Management.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_license_parser). -module(emqx_license_parser).

View File

@ -1,7 +1,7 @@
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved. %% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%% %%
%% @doc EMQ X License Management Supervisor. %% @doc EMQX License Management Supervisor.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
-module(emqx_license_sup). -module(emqx_license_sup).