You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/27 23:41:40 UTC

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1356: Updating TCP logger to use the batch processor util

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:
users@infra.apache.org


With regards,
Apache Git Services