OpenResty::Dispatcher - The main dispatcher for the OpenResty server
use OpenResty::Dispatcher; OpenResty::Dispatcher->init($context); # $context is the bin/openresty script's input command, # like 'fastcgi', 'cgi', or 'upgrade'. my $res = OpenResty::Dispatcher->process_request($cgi);
All the methods below are static. This class has no instances.
Connects to the database and preserving the global database connection, reads the config options, checks the metamodel version if
$contextis not "
upgrade", and does other initialization jobs.
$res = process_request($cgi, $call_level, $parent_account)
Process the incoming OpenResty RESTful request (not necessarily HTTP requests though). The first argument is a CGI object while the latter two only make sense in recursive calls issued by OpenRsety actions.
Agent Zhang (agentzh)