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


OpenResty documentation  | view source Contained in the OpenResty distribution.

Index


NAME

Top

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

SYNOPSIS

Top

    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

Top

METHODS

Top

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

Top

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

SEE ALSO

Top

OpenResty.


OpenResty documentation  | view source Contained in the OpenResty distribution.