openresty / lua-resty-upstream-healthcheck

Health Checker for Nginx Upstream Servers in Pure Lua
521 stars 134 forks source link

Configurable upstream manager module #12

Closed Tieske closed 6 years ago

Tieske commented 8 years ago

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 #11

Obviously, 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)

agentzh commented 8 years ago

@Tieske Maybe the option manager_module is a better name than upstream_mgr?

Tieske commented 8 years ago

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)

agentzh commented 8 years ago

@Tieske LOL. upstream_manager then.

Tieske commented 8 years ago

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?

agentzh commented 8 years ago

@Tieske Feel free to add stuff to this PR if you want to :)

agentzh commented 8 years ago

@Tieske You're currently the only person using this feature anyway :)

Tieske commented 6 years ago

we've diverted into other ways which no longer use the upstreams defined in the config. Hence closing this.