membphis commented on a change in pull request #1356: Updating TCP logger to 
use the batch processor util
URL: https://github.com/apache/incubator-apisix/pull/1356#discussion_r399580985
 
 

 ##########
 File path: lua/apisix/plugins/tcp-logger.lua
 ##########
 @@ -16,22 +16,27 @@
 --
 local core     = require("apisix.core")
 local log_util = require("apisix.utils.log-util")
+local batch_processor = require("apisix.utils.batch-processor")
 local plugin_name = "tcp-logger"
+local tostring = tostring
+local buffers = {}
 local ngx = ngx
-
-local timer_at = ngx.timer.at
 local tcp = ngx.socket.tcp
 
 local schema = {
     type = "object",
     properties = {
         host = {type = "string"},
         port = {type = "integer", minimum = 0},
-        timeout = {   -- timeout in milliseconds
-            type = "integer", minimum = 1, default= 1000
-        },
-        tls = { type = "boolean", default = false },
-        tls_options = { type = "string" }
+        tls = {type = "boolean", default = false},
+        tls_options = {type = "string"},
+        timeout = {type = "integer", minimum = 1, default = 3},
 
 Review comment:
   I think it can be kept in milliseconds.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to