Closed Tieske closed 6 years ago
@Tieske Maybe the option manager_module
is a better name than upstream_mgr
?
Maybe full name upstream_manager
? I don't like manager_module
because they are two words both not saying anything specific (might as well be a component of a taco dispenser in a supermarket)
@Tieske LOL. upstream_manager
then.
On second thought, we might need some more updates to reach the required level of flexibility. Also had a comment from @doujiang24 on that.
Some additional requirements;
Thoughts? Should we be adding those elements in this PR or separate?
@Tieske Feel free to add stuff to this PR if you want to :)
@Tieske You're currently the only person using this feature anyway :)
we've diverted into other ways which no longer use the upstreams defined in the config. Hence closing this.
the options table can now contain an optional option named
upstream_mgr
. If not provided, it will default to the normal resty upstream module. If given it must either be a module name to load, or the module table itself. see issue #11Obviously, the interface of the module provided must be identical to the default resty upstream module.
Note: the
status_page
function now takes an options table, but with only one option. The intent is to enable future changes without breaking backward compatibility (eg. instead of a page for all upstreams, specify a single one, or setting a flag to return a table or json with statusses instead of a page)