Yichun Zhang (章亦春)
and 1 contributors

NAME

OpenResty::Dispatcher - The main dispatcher for the OpenResty server

SYNOPSIS

    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);

DESCRIPTION

METHODS

All the methods below are static. This class has no instances.

init($context)

Connects to the database and preserving the global database connection, reads the config options, checks the metamodel version if $context is 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.

AUTHOR

Agent Zhang (agentzh) <agentzh@yahoo.cn>.

SEE ALSO

OpenResty.