Ver código fonte

add mqtt_route record

Feng 10 anos atrás
pai
commit
e7c1d85d91
1 arquivos alterados com 11 adições e 1 exclusões
  1. 11 1
      include/emqttd.hrl

+ 11 - 1
include/emqttd.hrl

@@ -47,7 +47,7 @@
 %%--------------------------------------------------------------------
 %%--------------------------------------------------------------------
 -record(mqtt_topic, {
 -record(mqtt_topic, {
     topic   :: binary(),
     topic   :: binary(),
-    node    :: node()
+    flags   :: [retained | static]
 }).
 }).
 
 
 -type mqtt_topic() :: #mqtt_topic{}.
 -type mqtt_topic() :: #mqtt_topic{}.
@@ -63,6 +63,16 @@
 
 
 -type mqtt_subscription() :: #mqtt_subscription{}.
 -type mqtt_subscription() :: #mqtt_subscription{}.
 
 
+%%--------------------------------------------------------------------
+%% MQTT Route
+%%--------------------------------------------------------------------
+-record(mqtt_route, {
+    topic   :: binary(),
+    node    :: node()
+}).
+
+-type mqtt_route() :: #mqtt_route{}.
+
 %%--------------------------------------------------------------------
 %%--------------------------------------------------------------------
 %% MQTT Client
 %% MQTT Client
 %%--------------------------------------------------------------------
 %%--------------------------------------------------------------------