This repository was archived by the owner on Jan 18, 2023. It is now read-only.
forked from openresty/lua-upstream-nginx-module
-
Notifications
You must be signed in to change notification settings - Fork 4
[WIP] Add and remove servers from upstreams #1
Open
wfarr
wants to merge
32
commits into
shopify
Choose a base branch
from
add-and-remove-servers-from-upstreams
base: shopify
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
README.md
Outdated
| * [Functions](#functions) | ||
| * [get_upstreams](#get_upstreams) | ||
| * [get_servers](#get_servers) | ||
| * [add_server_to_upstream](#add_server_to_upstream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd call them add_upstream_peer and remove_upstream_peer.
This is based heavily on the work in openresty#13 but involves slightly fewer changes to the module as a whole.
47662c8 to
c2f2863
Compare
Author
|
Tests run on Circle but there appears to be some race condition or double insert occurring that does not make sense to me right now. Will pick this back up again after the weekend. |
src/ngx_http_lua_upstream_module.c
Outdated
| time_t fail_timeout; | ||
| u_char *p; | ||
|
|
||
| if (lua_gettop(L) != 6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be some sane defaults here.
Only the upstream and HOST:IP are required. For everything else, we provide sane defaults and treat those arguments as optional.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On the path towards dynamic upstreams.
Heavily WIP. Do not merge.
cc @csfrancis