This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 9fafa43  chore: fix spelling, grammar and JSON example (#3821)
9fafa43 is described below

commit 9fafa43b3758a026db1c992a71e80e1a38ce5c96
Author: John Bampton <jbamp...@users.noreply.github.com>
AuthorDate: Mon Mar 15 10:56:43 2021 +1000

    chore: fix spelling, grammar and JSON example (#3821)
---
 apisix/discovery/consul_kv.lua         | 2 +-
 apisix/init.lua                        | 4 ++--
 apisix/plugin.lua                      | 4 ++--
 apisix/plugins/api-breaker.lua         | 2 +-
 apisix/plugins/error-log-logger.lua    | 2 +-
 apisix/plugins/example-plugin.lua      | 2 +-
 apisix/plugins/log-rotate.lua          | 2 +-
 apisix/plugins/node-status.lua         | 4 ++--
 apisix/plugins/prometheus/exporter.lua | 4 ++--
 apisix/plugins/response-rewrite.lua    | 6 +++---
 apisix/plugins/server-info.lua         | 2 +-
 docs/en/latest/admin-api.md            | 2 +-
 docs/en/latest/discovery/consul_kv.md  | 1 -
 docs/en/latest/discovery/dns.md        | 2 +-
 t/control/discovery.t                  | 2 +-
 t/node/grpc-proxy.t                    | 2 +-
 t/node/remote-addr-ipv6.t              | 2 +-
 t/node/upstream-ipv6.t                 | 2 +-
 t/plugin/prometheus2.t                 | 6 +++---
 t/plugin/response-rewrite.t            | 4 ++--
 20 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/apisix/discovery/consul_kv.lua b/apisix/discovery/consul_kv.lua
index 5f53231..e94f043 100644
--- a/apisix/discovery/consul_kv.lua
+++ b/apisix/discovery/consul_kv.lua
@@ -319,7 +319,7 @@ local function format_consul_params(consul_conf)
         if scheme ~= "http" then
             return nil, "only support consul http schema address, eg: 
http://address:port";
         elseif path ~= "/" or core.string.has_suffix(v, '/') then
-            return nil, "invald consul server address, the valid format: 
http://address:port";
+            return nil, "invalid consul server address, the valid format: 
http://address:port";
         end
 
         core.table.insert(consul_server_list, {
diff --git a/apisix/init.lua b/apisix/init.lua
index beec7e6..0b29257 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -548,7 +548,7 @@ function _M.http_body_filter_phase()
 end
 
 
-local function healcheck_passive(api_ctx)
+local function healthcheck_passive(api_ctx)
     local checker = api_ctx.up_checker
     if not checker then
         return
@@ -605,7 +605,7 @@ end
 
 function _M.http_log_phase()
     local api_ctx = common_phase("log")
-    healcheck_passive(api_ctx)
+    healthcheck_passive(api_ctx)
 
     if api_ctx.server_picker and api_ctx.server_picker.after_balance then
         api_ctx.server_picker.after_balance(api_ctx, false)
diff --git a/apisix/plugin.lua b/apisix/plugin.lua
index 4cbf722..8c9534a 100644
--- a/apisix/plugin.lua
+++ b/apisix/plugin.lua
@@ -71,8 +71,8 @@ local function unload_plugin(name, is_stream_plugin)
     end
 
     local old_plugin = pkg_loaded[pkg_name]
-    if old_plugin and type(old_plugin.destory) == "function" then
-        old_plugin.destory()
+    if old_plugin and type(old_plugin.destroy) == "function" then
+        old_plugin.destroy()
     end
 
     pkg_loaded[pkg_name] = nil
diff --git a/apisix/plugins/api-breaker.lua b/apisix/plugins/api-breaker.lua
index af3856b..7856373 100644
--- a/apisix/plugins/api-breaker.lua
+++ b/apisix/plugins/api-breaker.lua
@@ -174,7 +174,7 @@ function _M.log(conf, ctx)
         return
     end
 
-    -- unhealth process
+    -- unhealthy process
     if core.table.array_find(conf.unhealthy.http_statuses,
                              upstream_status)
     then
diff --git a/apisix/plugins/error-log-logger.lua 
b/apisix/plugins/error-log-logger.lua
index 9e5c746..c2d6d74 100644
--- a/apisix/plugins/error-log-logger.lua
+++ b/apisix/plugins/error-log-logger.lua
@@ -202,7 +202,7 @@ function _M.init()
 end
 
 
-function _M.destory()
+function _M.destroy()
     timers.unregister_timer("plugin#error-log-logger", true)
 end
 
diff --git a/apisix/plugins/example-plugin.lua 
b/apisix/plugins/example-plugin.lua
index 5d281ef..abe149e 100644
--- a/apisix/plugins/example-plugin.lua
+++ b/apisix/plugins/example-plugin.lua
@@ -66,7 +66,7 @@ function _M.init()
 end
 
 
-function _M.destory()
+function _M.destroy()
     -- call this function when plugin is unloaded
 end
 
diff --git a/apisix/plugins/log-rotate.lua b/apisix/plugins/log-rotate.lua
index 22709c2..4a03a80 100644
--- a/apisix/plugins/log-rotate.lua
+++ b/apisix/plugins/log-rotate.lua
@@ -210,7 +210,7 @@ function _M.init()
 end
 
 
-function _M.destory()
+function _M.destroy()
     timers.unregister_timer("plugin#log-rotate", true)
 end
 
diff --git a/apisix/plugins/node-status.lua b/apisix/plugins/node-status.lua
index 15c65bb..ceb574b 100644
--- a/apisix/plugins/node-status.lua
+++ b/apisix/plugins/node-status.lua
@@ -38,7 +38,7 @@ local _M = {
 
 
 local ngx_status = {}
-local ngx_statu_items = {
+local ngx_status_items = {
     "active", "accepted", "handled", "total",
     "reading", "writing", "waiting"
 }
@@ -61,7 +61,7 @@ local function collect()
     end
 
     core.table.clear(ngx_status)
-    for _, name in ipairs(ngx_statu_items) do
+    for _, name in ipairs(ngx_status_items) do
         local val = iterator()
         if not val then
             break
diff --git a/apisix/plugins/prometheus/exporter.lua 
b/apisix/plugins/prometheus/exporter.lua
index 13b17f4..2369934 100644
--- a/apisix/plugins/prometheus/exporter.lua
+++ b/apisix/plugins/prometheus/exporter.lua
@@ -164,7 +164,7 @@ function _M.log(conf, ctx)
 end
 
 
-    local ngx_statu_items = {"active", "accepted", "handled", "total",
+    local ngx_status_items = {"active", "accepted", "handled", "total",
                              "reading", "writing", "waiting"}
     local label_values = {}
 local function nginx_status()
@@ -185,7 +185,7 @@ local function nginx_status()
         return
     end
 
-    for _, name in ipairs(ngx_statu_items) do
+    for _, name in ipairs(ngx_status_items) do
         local val = iterator()
         if not val then
             break
diff --git a/apisix/plugins/response-rewrite.lua 
b/apisix/plugins/response-rewrite.lua
index 2614fcb..82ab120 100644
--- a/apisix/plugins/response-rewrite.lua
+++ b/apisix/plugins/response-rewrite.lua
@@ -126,7 +126,7 @@ end
 do
 
 function _M.body_filter(conf, ctx)
-    if not ctx.reponse_rewrite_matched then
+    if not ctx.response_rewrite_matched then
         return
     end
 
@@ -143,8 +143,8 @@ function _M.body_filter(conf, ctx)
 end
 
 function _M.header_filter(conf, ctx)
-    ctx.reponse_rewrite_matched = vars_matched(conf, ctx)
-    if not ctx.reponse_rewrite_matched then
+    ctx.response_rewrite_matched = vars_matched(conf, ctx)
+    if not ctx.response_rewrite_matched then
         return
     end
 
diff --git a/apisix/plugins/server-info.lua b/apisix/plugins/server-info.lua
index 5038eae..43f2768 100644
--- a/apisix/plugins/server-info.lua
+++ b/apisix/plugins/server-info.lua
@@ -245,7 +245,7 @@ function _M.init()
 end
 
 
-function _M.destory()
+function _M.destroy()
     timers.unregister_timer("plugin#server-info", true)
 end
 
diff --git a/docs/en/latest/admin-api.md b/docs/en/latest/admin-api.md
index 9bb4922..310aea7 100644
--- a/docs/en/latest/admin-api.md
+++ b/docs/en/latest/admin-api.md
@@ -690,7 +690,7 @@ For example,
 }
 ```
 
-Node `127.0.0.2` will be used only after `127.0.0.1` is unavaibled or tried.
+Node `127.0.0.2` will be used only after `127.0.0.1` is unavailable or tried.
 Therefore it is the backup of `127.0.0.1`.
 
 > Response Parameters
diff --git a/docs/en/latest/discovery/consul_kv.md 
b/docs/en/latest/discovery/consul_kv.md
index 44b684d..b5af505 100644
--- a/docs/en/latest/discovery/consul_kv.md
+++ b/docs/en/latest/discovery/consul_kv.md
@@ -177,7 +177,6 @@ For example:
       "port": 8899,
       "metadata": {
         "fail_timeout": 1,
-        "weigth": 1,
         "weight": 1,
         "max_fails": 1
       }
diff --git a/docs/en/latest/discovery/dns.md b/docs/en/latest/discovery/dns.md
index 909b688..0fd7977 100644
--- a/docs/en/latest/discovery/dns.md
+++ b/docs/en/latest/discovery/dns.md
@@ -39,7 +39,7 @@ discovery:
        - "127.0.0.1:8600"          # use the real address of your dns server
 ```
 
-Unlike configurating domain in the Upstream's `nodes` field, service discovery 
via
+Unlike configuring the domain in the Upstream's `nodes` field, service 
discovery via
 DNS will return all records. For example, with upstream configuration:
 
 ```json
diff --git a/t/control/discovery.t b/t/control/discovery.t
index c36b124..c9a4ed2 100644
--- a/t/control/discovery.t
+++ b/t/control/discovery.t
@@ -109,7 +109,7 @@ GET /v1/discovery/dns/dump
 
 
 
-=== TEST 4: test unconfiged eureka dump_data api
+=== TEST 4: test unconfigured eureka dump_data api
 --- yaml_config
 apisix:
   enable_control: true
diff --git a/t/node/grpc-proxy.t b/t/node/grpc-proxy.t
index 00ebcb7..e8241ac 100644
--- a/t/node/grpc-proxy.t
+++ b/t/node/grpc-proxy.t
@@ -119,7 +119,7 @@ proxy request to 127.0.0.1:9088
 
 
 
-=== TEST 4: with consummer (old way)
+=== TEST 4: with consumer (old way)
 --- apisix_yaml
 consumers:
   - username: jack
diff --git a/t/node/remote-addr-ipv6.t b/t/node/remote-addr-ipv6.t
index 2e610fe..7f5d974 100644
--- a/t/node/remote-addr-ipv6.t
+++ b/t/node/remote-addr-ipv6.t
@@ -21,7 +21,7 @@ no_root_location();
 my $travis_os_name = $ENV{TRAVIS_OS_NAME};
 if ((defined $travis_os_name) && $travis_os_name eq "linux") {
     plan(skip_all =>
-      "skip under Travis CI inux environment which doesn't work well with 
IPv6");
+      "skip under Travis CI Linux environment which doesn't work well with 
IPv6");
 } else {
     plan 'no_plan';
 }
diff --git a/t/node/upstream-ipv6.t b/t/node/upstream-ipv6.t
index 7631a1e..f4b7875 100644
--- a/t/node/upstream-ipv6.t
+++ b/t/node/upstream-ipv6.t
@@ -19,7 +19,7 @@ use t::APISIX;
 my $travis_os_name = $ENV{TRAVIS_OS_NAME};
 if ((defined $travis_os_name) && $travis_os_name eq "linux") {
     plan(skip_all =>
-      "skip under Travis CI inux environment which doesn't work well with 
IPv6");
+      "skip under Travis CI Linux environment which doesn't work well with 
IPv6");
 } else {
     plan 'no_plan';
 }
diff --git a/t/plugin/prometheus2.t b/t/plugin/prometheus2.t
index 4bd169c..c587c4e 100644
--- a/t/plugin/prometheus2.t
+++ b/t/plugin/prometheus2.t
@@ -91,7 +91,7 @@ 
qr/apisix_bandwidth\{type="egress",route="1",service="",consumer="",node=""\} \d
 
 
 
-=== TEST 4: set consumer for metics data collection
+=== TEST 4: set consumer for metrics data collection
 --- config
     location /t {
         content_by_lua_block {
@@ -647,7 +647,7 @@ passed
 
 
 
-=== TEST 32:  tigger metircs batch-process-metrics
+=== TEST 32:  trigger metrics batch-process-metrics
 --- request
 GET /batch-process-metrics-10
 --- error_code: 404
@@ -715,7 +715,7 @@ passed
 
 
 
-=== TEST 35:  tigger metircs batch-process-metrics
+=== TEST 35:  trigger metrics batch-process-metrics
 --- request
 GET /batch-process-metrics-10
 --- error_code: 404
diff --git a/t/plugin/response-rewrite.t b/t/plugin/response-rewrite.t
index 90e231b..6fdb29b 100644
--- a/t/plugin/response-rewrite.t
+++ b/t/plugin/response-rewrite.t
@@ -608,7 +608,7 @@ passed
 
 
 
-=== TEST 20: check http code that matchs http_status
+=== TEST 20: check http code that matches http_status
 --- request
 GET /server_error
 --- response_body
@@ -620,7 +620,7 @@ new body3
 
 
 
-=== TEST 21: check http code that not matchs http_status
+=== TEST 21: check http code that not matches http_status
 --- request
 GET /hello
 --- response_body

Reply via email to