@@ -11,6 +11,7 @@ Table of Contents
1111* [ Synopsis] ( #synopsis )
1212* [ Description] ( #description )
1313* [ Prerequisites] ( #prerequisites )
14+ * [ Installation] ( #installation )
1415* [ API Implemented] ( #api-implemented )
1516 * [ resty.core.hash] ( #restycorehash )
1617 * [ resty.core.base64] ( #restycorebase64 )
@@ -20,16 +21,20 @@ Table of Contents
2021 * [ resty.core.shdict] ( #restycoreshdict )
2122 * [ resty.core.var] ( #restycorevar )
2223 * [ resty.core.ctx] ( #restycorectx )
24+ * [ get_ctx_table] ( #get_ctx_table )
2325 * [ resty.core.request] ( #restycorerequest )
2426 * [ resty.core.response] ( #restycoreresponse )
2527 * [ resty.core.misc] ( #restycoremisc )
2628 * [ resty.core.time] ( #restycoretime )
2729 * [ resty.core.worker] ( #restycoreworker )
2830 * [ resty.core.phase] ( #restycorephase )
2931 * [ resty.core.ndk] ( #restycorendk )
32+ * [ resty.core.socket] ( #restycoresocket )
33+ * [ resty.core.param] ( #restycoreparam )
3034 * [ ngx.semaphore] ( #ngxsemaphore )
3135 * [ ngx.balancer] ( #ngxbalancer )
3236 * [ ngx.ssl] ( #ngxssl )
37+ * [ ngx.ssl.clienthello] ( #ngxsslclienthello )
3338 * [ ngx.ssl.session] ( #ngxsslsession )
3439 * [ ngx.re] ( #ngxre )
3540 * [ ngx.resp] ( #ngxresp )
@@ -51,7 +56,7 @@ This library is production ready.
5156Synopsis
5257========
5358
54- This library is automatically loaded by default in OpenResty 1.15.8.1. This
59+ This library is automatically loaded by default since OpenResty 1.15.8.1. This
5560behavior can be disabled via the
5661[ lua_load_resty_core] ( https://github.com/openresty/lua-nginx-module#lua_load_resty_core )
5762directive, but note that the use of this library is vividly recommended, as its
@@ -108,12 +113,45 @@ of this library in the particular OpenResty release you are using. Otherwise you
108113into serious compatibility issues.
109114
110115* LuaJIT 2.1 (for now, it is the v2.1 git branch in the official luajit-2.0 git repository: http://luajit.org/download.html )
111- * [ ngx_http_lua_module] ( https://github.com/openresty/lua-nginx-module ) v0.10.18 .
112- * [ ngx_stream_lua_module] ( https://github.com/openresty/stream-lua-nginx-module ) v0.0.9 .
116+ * [ ngx_http_lua_module] ( https://github.com/openresty/lua-nginx-module ) v0.10.25 .
117+ * [ ngx_stream_lua_module] ( https://github.com/openresty/stream-lua-nginx-module ) v0.0.13 .
113118* [ lua-resty-lrucache] ( https://github.com/openresty/lua-resty-lrucache )
114119
115120[ Back to TOC] ( #table-of-contents )
116121
122+ Installation
123+ ============
124+
125+ By default, LuaJIT will search Lua files in /usr/local/share/lua/5.1/.
126+ But ` make install ` will install this module to /usr/local/lib/lua.
127+ So you may find the error like this:
128+
129+ ``` text
130+ nginx: [alert] failed to load the 'resty.core' module
131+ ```
132+
133+ You can install this module with the following command to resolve the above problem.
134+
135+ ``` bash
136+ cd lua-resty-core
137+ sudo make install LUA_LIB_DIR=/usr/local/share/lua/5.1
138+ ```
139+
140+ You can also change the installation directory to any other directory you like with the LUA_LIB_DIR argument.
141+
142+ ``` bash
143+ cd lua-resty-core
144+ sudo make install LUA_LIB_DIR=/opt/nginx/lualib
145+ ```
146+
147+ After that, you need to add the above directory to the LuaJIT search direcotries with ` lua_package_path ` nginx directive in the http context and stream context.
148+
149+ ```
150+ lua_package_path "/opt/nginx/lualib/?.lua;;";
151+ ```
152+
153+ [ Back to TOC] ( #table-of-contents )
154+
117155API Implemented
118156===============
119157
@@ -188,6 +226,21 @@ API Implemented
188226
189227[ Back to TOC] ( #table-of-contents )
190228
229+ ## get_ctx_table
230+
231+ ** syntax:** * ctx = resty.core.ctx.get_ctx_table(ctx?)*
232+
233+ Similar to [ ngx.ctx] ( #restycorectx ) but it accepts an optional ` ctx ` argument.
234+ It will use the ` ctx ` from caller instead of creating a new table
235+ when the ` ctx ` table does not exist.
236+
237+ Notice: the ` ctx ` table will be used in the current request's whole life cycle.
238+ Please be very careful when you try to reuse the ` ctx ` table.
239+ You need to make sure there is no Lua code using or going to use the ` ctx ` table
240+ in the current request before you reusing the ` ctx ` table in some other place.
241+
242+ [ Back to TOC] ( #table-of-contents )
243+
191244## resty.core.request
192245
193246* [ ngx.req.get_headers] ( https://github.com/openresty/lua-nginx-module#ngxreqget_headers )
@@ -211,6 +264,7 @@ API Implemented
211264* [ ngx.status] ( https://github.com/openresty/lua-nginx-module#ngxstatus )
212265* [ ngx.is_subrequest] ( https://github.com/openresty/lua-nginx-module#ngxis_subrequest )
213266* [ ngx.headers_sent] ( https://github.com/openresty/lua-nginx-module#ngxheaders_sent )
267+ * [ ngx.req.is_internal] ( https://github.com/openresty/lua-nginx-module#ngxreqis_internal )
214268
215269[ Back to TOC] ( #table-of-contents )
216270
@@ -224,6 +278,8 @@ API Implemented
224278* [ ngx.cookie_time] ( https://github.com/openresty/lua-nginx-module#ngxcookie_time )
225279* [ ngx.http_time] ( https://github.com/openresty/lua-nginx-module#ngxhttp_time )
226280* [ ngx.parse_http_time] ( https://github.com/openresty/lua-nginx-module#ngxparse_http_time )
281+ * [ monotonic_msec] ( ./lib/resty/core/time.md#monotonic_msec )
282+ * [ monotonic_time] ( ./lib/resty/core/time.md#monotonic_time )
227283
228284[ Back to TOC] ( #table-of-contents )
229285
@@ -248,6 +304,20 @@ API Implemented
248304
249305[ Back to TOC] ( #table-of-contents )
250306
307+ ## resty.core.socket
308+
309+ * [ socket.setoption] ( https://github.com/openresty/lua-nginx-module#tcpsocksetoption )
310+ * [ socket.setclientcert] ( https://github.com/openresty/lua-nginx-module#tcpsocksetclientcert )
311+ * [ socket.sslhandshake] ( https://github.com/openresty/lua-nginx-module#tcpsocksslhandshake )
312+
313+ [ Back to TOC] ( #table-of-contents )
314+
315+ ## resty.core.param
316+
317+ * [ ngx.arg] ( https://github.com/openresty/lua-nginx-module#ngxarg ) (getter only)
318+
319+ [ Back to TOC] ( #table-of-contents )
320+
251321## ngx.semaphore
252322
253323This Lua module implements a semaphore API for efficient "light thread" synchronization,
@@ -274,6 +344,15 @@ See the [documentation](./lib/ngx/ssl.md) for this Lua module for more details.
274344
275345[ Back to TOC] ( #table-of-contents )
276346
347+ ## ngx.ssl.clienthello
348+
349+ This Lua module provides a Lua API for post-processing SSL client hello message
350+ for NGINX downstream SSL connections.
351+
352+ See the [ documentation] ( ./lib/ngx/ssl/clienthello.md ) for this Lua module for more details.
353+
354+ [ Back to TOC] ( #table-of-contents )
355+
277356## ngx.ssl.session
278357
279358This Lua module provides a Lua API for manipulating SSL session data and IDs
0 commit comments