trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kic...@apache.org
Subject trafficserver git commit: TS-3414: update doc for the new api
Date Thu, 19 Mar 2015 07:04:07 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 90e001201 -> b12b0399f


TS-3414: update doc for the new api


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b12b0399
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b12b0399
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b12b0399

Branch: refs/heads/master
Commit: b12b0399f0aeb85cec3a622ebf61e541d9c29912
Parents: 90e0012
Author: Kit Chan <kichan@apache.org>
Authored: Thu Mar 19 00:03:57 2015 -0700
Committer: Kit Chan <kichan@apache.org>
Committed: Thu Mar 19 00:03:57 2015 -0700

----------------------------------------------------------------------
 doc/reference/plugins/ts_lua.en.rst | 63 ++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b12b0399/doc/reference/plugins/ts_lua.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/plugins/ts_lua.en.rst b/doc/reference/plugins/ts_lua.en.rst
index b0b490f..5e01c36 100644
--- a/doc/reference/plugins/ts_lua.en.rst
+++ b/doc/reference/plugins/ts_lua.en.rst
@@ -1071,6 +1071,69 @@ Here is an example:
 
 `TOP <#ts-lua-plugin>`_
 
+ts.server_request.server_addr.get_ip
+------------------------------------
+**syntax:** *ts.server_request.server_addr.get_ip()*
+
+**context:** do_remap or do_global_* or later
+
+**description**: This function can be used to get ip address of the origin server.
+
+The ts.server_request.server_addr.get_ip function returns ip as a string.
+
+Here is an example:
+
+::
+
+    function do_global_send_request()
+        ip = ts.server_request.server_addr.get_ip()
+        print(ip)               -- 192.168.231.17
+    end
+
+`TOP <#ts-lua-plugin>`_
+
+ts.server_request.server_addr.get_port
+--------------------------------------
+**syntax:** *ts.server_request.server_addr.get_port()*
+
+**context:** do_remap or do_global_* or later
+
+**description**: This function can be used to get port of the origin server.
+
+The ts.server_request.server_addr.get_port function returns port as number.
+
+Here is an example:
+
+::
+
+    function do_global_send_request()
+        port = ts.server_request.server_addr.get_port()
+        print(port)             -- 80
+    end
+
+`TOP <#ts-lua-plugin>`_
+
+ts.server_request.server_addr.get_outgoing_port
+-----------------------------------------------
+**syntax:** *ts.server_request.server_addr.get_outgoing_port()*
+
+**context:** do_remap or do_global_* or later
+
+**description**: This function can be used to get outgoing port to the origin server.
+
+The ts.server_request.server_addr.get_outgoing_port function returns outgoing port as number.
+
+Here is an example:
+
+::
+
+    function do_global_send_request()
+        port = ts.server_request.server_addr.get_outgoing_port()
+        print(port)             -- 50880
+    end
+
+`TOP <#ts-lua-plugin>`_
+
 ts.server_response.get_status
 -----------------------------
 **syntax:** *status = ts.server_response.get_status()*


Mime
View raw message