Skip to content

feature: balancer_by_lua_* for stream subsystem #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ documentation of `ngx_http_lua_module` for more details about their usage and be
* [init_worker_by_lua_file](https://github.com/openresty/lua-nginx-module#init_worker_by_lua_file)
* [content_by_lua_block](https://github.com/openresty/lua-nginx-module#content_by_lua_block)
* [content_by_lua_file](https://github.com/openresty/lua-nginx-module#content_by_lua_file)
* [balancer_by_lua_block](https://github.com/openresty/lua-nginx-module#balancer_by_lua_block)
* [balancer_by_lua_file](https://github.com/openresty/lua-nginx-module#balancer_by_lua_file)
* [lua_shared_dict](https://github.com/openresty/lua-nginx-module#lua_shared_dict)
* [lua_socket_connect_timeout](https://github.com/openresty/lua-nginx-module#lua_socket_connect_timeout)
* [lua_socket_buffer_size](https://github.com/openresty/lua-nginx-module#lua_socket_buffer_size)
Expand Down Expand Up @@ -254,6 +256,9 @@ output to be completely flushed out (to the system socket send buffers).
* [ngx.worker.pid](https://github.com/openresty/lua-nginx-module#ngxworkerpid)
* [ngx.worker.count](https://github.com/openresty/lua-nginx-module#ngxworkercount)
* [ngx.worker.id](https://github.com/openresty/lua-nginx-module#ngxworkerid)
* [ngx.balancer](https://github.com/openresty/lua-nginx-module#ngxbalancer)

For now, only `set_current_peer` and `set_more_tries`(Not respect `proxy_next_upstream_tries`) provided.
* [coroutine.create](https://github.com/openresty/lua-nginx-module#coroutinecreate)
* [coroutine.resume](https://github.com/openresty/lua-nginx-module#coroutineresume)
* [coroutine.yield](https://github.com/openresty/lua-nginx-module#coroutineyield)
Expand All @@ -268,7 +273,7 @@ TODO

* Add new directives `access_by_lua_block` and `access_by_lua_file`.
* Add new directives `log_by_lua_block` and `log_by_lua_file`.
* Add new directives `balancer_by_lua_block` and `balancer_by_lua_file`.
* Add `set_timeouts` in `ngx.balancer` and respect `proxy_next_upstream_tries` for `set_more_tries`.
* Add new directives `ssl_certificate_by_lua_block` and `ssl_certificate_by_lua_file`.
* Add `ngx.semaphore` API.
* Add `ngx_meta_lua_module` to share as much code as possible between this module and `ngx_http_lua_module` and allow sharing
Expand Down
2 changes: 2 additions & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
$ngx_addon_dir/src/ngx_stream_lua_directive.c \
$ngx_addon_dir/src/ngx_stream_lua_lex.c \
$ngx_addon_dir/src/ngx_stream_lua_contentby.c \
$ngx_addon_dir/src/ngx_stream_lua_balancer.c \
$ngx_addon_dir/src/ngx_stream_lua_util.c \
$ngx_addon_dir/src/ngx_stream_lua_cache.c \
$ngx_addon_dir/src/ngx_stream_lua_clfactory.c \
Expand Down Expand Up @@ -343,6 +344,7 @@ NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
$ngx_addon_dir/src/ngx_stream_lua_common.h \
$ngx_addon_dir/src/ngx_stream_lua_lex.h \
$ngx_addon_dir/src/ngx_stream_lua_contentby.h \
$ngx_addon_dir/src/ngx_stream_lua_balancer.h \
$ngx_addon_dir/src/ngx_stream_lua_util.h \
$ngx_addon_dir/src/ngx_stream_lua_cache.h \
$ngx_addon_dir/src/ngx_stream_lua_clfactory.h \
Expand Down
2 changes: 1 addition & 1 deletion src/api/ngx_stream_lua_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* Public API for other Nginx modules */


#define ngx_stream_lua_version 10001
#define ngx_stream_lua_version 10006


typedef struct {
Expand Down
Loading