diff --git a/apps/emqx/test/emqx_request_handler.erl b/apps/emqx/test/emqx_request_handler.erl index ddd0a563f..62bcf4260 100644 --- a/apps/emqx/test/emqx_request_handler.erl +++ b/apps/emqx/test/emqx_request_handler.erl @@ -20,8 +20,8 @@ -include_lib("emqx/include/emqx_mqtt.hrl"). --type qos() :: emqx_mqtt_types:qos_name() | emqx_mqtt_types:qos(). --type topic() :: emqx_topic:topic(). +-type qos() :: emqx_types:qos_name() | emqx_types:qos(). +-type topic() :: emqx_types:topic(). -type handler() :: fun((CorrData :: binary(), ReqPayload :: binary()) -> RspPayload :: binary()). -spec start_link(topic(), qos(), handler(), emqtt:options()) -> diff --git a/apps/emqx_connector/src/mqtt/emqx_connector_mqtt_worker.erl b/apps/emqx_connector/src/mqtt/emqx_connector_mqtt_worker.erl index bb505f98d..75bf88086 100644 --- a/apps/emqx_connector/src/mqtt/emqx_connector_mqtt_worker.erl +++ b/apps/emqx_connector/src/mqtt/emqx_connector_mqtt_worker.erl @@ -104,7 +104,7 @@ ]). -type id() :: atom() | string() | pid(). --type qos() :: emqx_mqtt_types:qos(). +-type qos() :: emqx_types:qos(). -type config() :: map(). -type batch() :: [emqx_connector_mqtt_msg:exp_msg()]. -type ack_ref() :: term(). diff --git a/apps/emqx_rule_engine/src/emqx_rule_funcs.erl b/apps/emqx_rule_engine/src/emqx_rule_funcs.erl index 21c715745..f73858f32 100644 --- a/apps/emqx_rule_engine/src/emqx_rule_funcs.erl +++ b/apps/emqx_rule_engine/src/emqx_rule_funcs.erl @@ -265,7 +265,7 @@ payload(Path) -> %% @doc Check if a topic_filter contains a specific topic %% TopicFilters = [{<<"t/a">>, #{qos => 0}]. --spec(contains_topic(emqx_mqtt_types:topic_filters(), emqx_types:topic()) +-spec(contains_topic(emqx_types:topic_filters(), emqx_types:topic()) -> true | false). contains_topic(TopicFilters, Topic) -> case find_topic_filter(Topic, TopicFilters, fun eq/2) of @@ -278,7 +278,7 @@ contains_topic(TopicFilters, Topic, QoS) -> _ -> false end. --spec(contains_topic_match(emqx_mqtt_types:topic_filters(), emqx_types:topic()) +-spec(contains_topic_match(emqx_types:topic_filters(), emqx_types:topic()) -> true | false). contains_topic_match(TopicFilters, Topic) -> case find_topic_filter(Topic, TopicFilters, fun emqx_topic:match/2) of