Просмотр исходного кода

mv etc/ to emqttd-relx project

Feng Lee 9 лет назад
Родитель
Сommit
c40d59d3cc
8 измененных файлов с 0 добавлено и 346 удалено
  1. 0 1
      ebin/.placeholder
  2. 0 28
      etc/acl.conf
  3. 0 3
      etc/client.conf
  4. 0 266
      etc/emqttd.conf
  5. 0 2
      etc/passwd.conf
  6. 0 14
      etc/rewrite.conf
  7. 0 17
      etc/ssl/ssl.crt
  8. 0 15
      etc/ssl/ssl.key

+ 0 - 1
ebin/.placeholder

@@ -1 +0,0 @@
-emqttd plugin cannot include "emqttd/include/emqttd.hrl" without this directory:(

+ 0 - 28
etc/acl.conf

@@ -1,28 +0,0 @@
-%%--------------------------------------------------------------------
-%%
-%% [ACL](https://github.com/emqtt/emqttd/wiki/ACL)
-%%
-%% -type who() :: all | binary() |
-%%                {ipaddr, esockd_access:cidr()} |
-%%                {client, binary()} |
-%%                {user, binary()}.
-%%
-%% -type access() :: subscribe | publish | pubsub.
-%%
-%% -type topic() :: binary().
-%%
-%% -type rule() :: {allow, all} |
-%%                 {allow, who(), access(), list(topic())} |
-%%                 {deny, all} |
-%%                 {deny, who(), access(), list(topic())}.
-%%
-%%--------------------------------------------------------------------
-
-{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
-
-{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
-
-{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
-
-{allow, all}.
-

+ 0 - 3
etc/client.conf

@@ -1,3 +0,0 @@
-"testclientid0".
-{"testclientid1", "127.0.0.1"}.
-{"testclientid2", "192.168.0.1/24"}.

+ 0 - 266
etc/emqttd.conf

@@ -1,266 +0,0 @@
-%%===================================================================
-%%
-%% Config file for emqttd 2.0
-%%
-%% Erlang Term Syntax:
-%%
-%% {}: Tuple, usually {Key, Value}
-%% []: List, seperated by comma
-%% %%: Comment
-%%
-%%===================================================================
-
-%%--------------------------------------------------------------------
-%% MQTT Protocol
-%%--------------------------------------------------------------------
-
-%% Max ClientId Length Allowed.
-{mqtt_max_clientid_len, 512}.
-
-%% Max Packet Size Allowed, 64K by default.
-{mqtt_max_packet_size, 65536}.
-
-%% Client Idle Timeout.
-{mqtt_client_idle_timeout, 30}. % Second
-
-%%--------------------------------------------------------------------
-%% Authentication
-%%--------------------------------------------------------------------
-
-%% Anonymous: Allow all
-{auth, anonymous, []}.
-
-%% Authentication with username, password
-{auth, username, [{passwd, "etc/passwd.conf"}]}.
-
-%% Authentication with clientId
-{auth, clientid, [{config, "etc/client.conf"}, {password, no}]}.
-
-%%--------------------------------------------------------------------
-%% ACL
-%%--------------------------------------------------------------------
-
-{acl, anonymous, []}.
-
-{acl, internal, [{config, "etc/acl.conf"}, {nomatch, allow}]}.
-
-%% Cache ACL result for PUBLISH
-{cache_acl, true}.
-
-%%--------------------------------------------------------------------
-%% Broker
-%%--------------------------------------------------------------------
-
-%% System interval of publishing broker $SYS messages
-{broker_sys_interval, 60}.
-
-%%--------------------------------------------------------------------
-%% Retained message
-%%--------------------------------------------------------------------
-
-%% Expired after seconds, never expired if 0
-{retained_expired_after, 0}.
-
-%% Max number of retained messages
-{retained_max_message_num, 100000}.
-
-%% Max Payload Size of retained message
-{retained_max_playload_size, 65536}.
-
-%%--------------------------------------------------------------------
-%% Session
-%%--------------------------------------------------------------------
-
-%% Max number of QoS 1 and 2 messages that can be “inflight” at one time.
-%% 0 means no limit
-{session_max_inflight, 100}.
-
-%% Retry interval for redelivering QoS1/2 messages.
-{session_unack_retry_interval, 60}.
-
-%% Awaiting PUBREL Timeout
-{session_await_rel_timeout, 20}.
-
-%% Max Packets that Awaiting PUBREL, 0 means no limit
-{session_max_awaiting_rel, 0}.
-
-%% Statistics Collection Interval(seconds)
-{session_collect_interval, 0}.
-
-%% Expired after 2 day (unit: minute)
-{session_expired_after, 2880}.
-
-%%--------------------------------------------------------------------
-%% Queue
-%%--------------------------------------------------------------------
-
-%% Type: simple | priority
-{queue_type, simple}.
-
-%% Topic Priority: 0~255, Default is 0
-%% {queue_priority, [{"topic/1", 10}, {"topic/2", 8}]}.
-
-%% Max queue length. Enqueued messages when persistent client disconnected,
-%% or inflight window is full.
-{queue_max_length, infinity}.
-
-%% Low-water mark of queued messages
-{queue_low_watermark, 0.2}.
-
-%% High-water mark of queued messages
-{queue_high_watermark, 0.6}.
-
-%% Queue Qos0 messages?
-{queue_qos0, true}.
-
-%%--------------------------------------------------------------------
-%% Zone
-%%--------------------------------------------------------------------
-
-{zone, admin, []}.
-
-%%--------------------------------------------------------------------
-%% Listener
-%%--------------------------------------------------------------------
-
-%% Plain MQTT
-{listener, mqtt, 1883, [
-    %% Size of acceptor pool
-    {acceptors, 16},
-
-    %% Maximum number of concurrent clients
-    {max_clients, 512},
-
-    %% Mount point prefix
-    %% {mount_point, "prefix/"},
-
-    %% Socket Access Control
-    {access, [{allow, all}]},
-
-    %% Connection Options
-    {connopts, [
-        %% Rate Limit. Format is 'burst, rate', Unit is KB/Sec
-        %% {rate_limit, "100,10"} %% 100K burst, 10K rate
-    ]},
-
-    %% Socket Options
-    {sockopts, [
-        %Set buffer if hight thoughtput
-        %{recbuf, 4096},
-        %{sndbuf, 4096},
-        %{buffer, 4096},
-        %{nodelay, true},
-        {backlog, 1024}
-    ]}
-]}.
-
-%% MQTT/SSL
-{listener, mqtts, 8883, [
-    %% Size of acceptor pool
-    {acceptors, 4},
-
-    %% Maximum number of concurrent clients
-    {max_clients, 512},
-
-    %% Socket Access Control
-    {access, [{allow, all}]},
-
-    %% SSL certificate and key files
-    {ssl, [{certfile, "etc/ssl/ssl.crt"},
-           {keyfile,  "etc/ssl/ssl.key"}]},
-
-    %% Socket Options
-    {sockopts, [
-        {backlog, 1024}
-        %{buffer, 4096},
-    ]}
-]}.
-
-%% HTTP and WebSocket Listener
-{listener, http, 8083, [
-    %% Size of acceptor pool
-    {acceptors, 4},
-
-    %% Maximum number of concurrent clients
-    {max_clients, 64},
-
-    %% Socket Access Control
-    {access, [{allow, all}]},
-
-    %% Socket Options
-    {sockopts, [
-        {backlog, 1024}
-        %{buffer, 4096},
-    ]}
-]}.
-
-%%--------------------------------------------------------------------
-%% PubSub
-%%--------------------------------------------------------------------
-
-%% PubSub and Router. Default should be scheduler numbers.
-{pubsub_pool_size, 8}.
-
-%%--------------------------------------------------------------------
-%% Routing
-%%--------------------------------------------------------------------
-
-%% Route aging time(seconds)
-{routing_age, 5}.
-
-%%--------------------------------------------------------------------
-%% Bridge
-%%--------------------------------------------------------------------
-
-%% TODO: Bridge Queue Size
-{bridge_max_queue_len, 10000}.
-
-%% Ping Interval of bridge node
-{bridge_ping_down_interval, 1}. % second
-
-%%-------------------------------------------------------------------
-%% Plugins
-%%-------------------------------------------------------------------
-
-%% Dir of plugins' config
-{plugins_etc_dir, "etc/plugins/"}.
-
-%% File to store loaded plugin names.
-{plugins_loaded_file, "data/loaded_plugins"}.
-
-%%--------------------------------------------------------------------
-%% Modules
-%%--------------------------------------------------------------------
-
-%% Client presence management module. Publish presence messages when 
-%% client connected or disconnected.
-{module, presence, [{qos, 0}]}.
-
-%% Subscribe topics automatically when client connected
-{module, subscription, [{"$queue/clients/$c", 1}, backend]}.
-
-%% [Rewrite](https://github.com/emqtt/emqttd/wiki/Rewrite)
-{module, rewrite, [{config, "etc/rewrite.conf"}]}.
-
-%%-------------------------------------------------------------------
-%% Erlang System Monitor
-%%-------------------------------------------------------------------
-
-%% Long GC, don't monitor in production mode for:
-%% https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421
-
-{sysmon_long_gc, false}.
-
-%% Long Schedule(ms)
-{sysmon_long_schedule, 240}.
-
-%% 8M words. 32MB on 32-bit VM, 64MB on 64-bit VM.
-%% 8 * 1024 * 1024
-{sysmon_large_heap, 8388608}.
-
-%% Busy Port
-{sysmon_busy_port, false}.
-
-%% Busy Dist Port
-{sysmon_busy_dist_port, true}.
-

+ 0 - 2
etc/passwd.conf

@@ -1,2 +0,0 @@
-{"user1", "passwd1"}.
-{"user2", "passwd2"}.

+ 0 - 14
etc/rewrite.conf

@@ -1,14 +0,0 @@
-
-%%--------------------------------------------------------------------
-%% [Rewrite](https://github.com/emqtt/emqttd/wiki/Rewrite)
-%%--------------------------------------------------------------------
-
-%{topic, "x/#", [
-%    {rewrite, "^x/y/(.+)$", "z/y/$1"},
-%    {rewrite, "^x/(.+)$", "y/$1"}
-%]}.
-
-%{topic, "y/+/z/#", [
-%    {rewrite, "^y/(.+)/z/(.+)$", "y/z/$2"}
-%]}.
-

+ 0 - 17
etc/ssl/ssl.crt

@@ -1,17 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICuTCCAiICCQC8+3PPaqATfDANBgkqhkiG9w0BAQUFADCBoDELMAkGA1UEBhMC
-Q0gxETAPBgNVBAgTCFpoZUppYW5nMREwDwYDVQQHEwhIYW5nWmhvdTEUMBIGA1UE
-ChMLWGlhb0xpIFRlY2gxHzAdBgNVBAsTFkluZm9ybWF0aW9uIFRlY2hub2xvZ3kx
-EzARBgNVBAMTCnQuZW1xdHQuaW8xHzAdBgkqhkiG9w0BCQEWEGZlbmcgYXQgZW1x
-dHQuaW8wHhcNMTUwMjI1MTc0NjQwWhcNMTYwMjI1MTc0NjQwWjCBoDELMAkGA1UE
-BhMCQ0gxETAPBgNVBAgTCFpoZUppYW5nMREwDwYDVQQHEwhIYW5nWmhvdTEUMBIG
-A1UEChMLWGlhb0xpIFRlY2gxHzAdBgNVBAsTFkluZm9ybWF0aW9uIFRlY2hub2xv
-Z3kxEzARBgNVBAMTCnQuZW1xdHQuaW8xHzAdBgkqhkiG9w0BCQEWEGZlbmcgYXQg
-ZW1xdHQuaW8wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALAtN2OHsvltOk+9
-AtlwMtKuaWW2WpV/S0lRRG9x9k8pyd5PJeeYAr2jVsoWnZInb1CoEOHFcwxZLjv3
-gEvz+X+//W02YyI9hnvCJUpT/+6P0gJEbmTmqL078M6vbtwtiF1YC7mdo0nGAZuK
-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