Can we design it like this? First in _mkp_init_(), get necessary parameters from the plugin configuration file, including script names, scripts run time, etc. Pass server configuration information to Lua scripts.
Then in _mkp_stage_30(), get content information and call functions in Lua scripts to handle it. In Lua scripts we need to receive server configuration information, handle content, and display necessary information to operators. On Fri, Mar 7, 2014 at 11:12 AM, Eduardo Silva <[email protected]> wrote: > hi, > > the fact is the server must be able to run Lua scripts, for content > handling or internals management. You are doing right about the variables > mentioned, > > regards, > > > On Thu, Mar 6, 2014 at 6:45 PM, Kai Dong <[email protected]> wrote: > >> For 1), we need to implement a list of Lua APIs in the plugin. >> For 2), we need to collect information when the server is handling the >> context of the request in stage 30. >> >> Is that correct? >> >> I think we can get the server configuration from the global variable >> "config", the plugin lists >> from the parameter "plugin", memory usage from another parameter >> "session_request *sr". >> >> Regards, >> >> >> >> On Wed, Mar 5, 2014 at 12:32 PM, Eduardo Silva <[email protected]> wrote: >> >>> >>> >>> >>> On Mon, Mar 3, 2014 at 4:23 PM, Kai Dong <[email protected]> wrote: >>> >>>> So the lua scripts should interact with the plugin. >>>> When the server start up, the scripts send information to >>>> the plugin for configuration, and during the runtime of the >>>> server, the plugin gets information and sends them to lua >>>> scripts for further handling? >>>> >>>> Best, >>>> >>>> >>> the answer could be longer, but there are two main points: >>> >>> 1) The server must be able to run and send back responses generated by >>> Lua scripts. >>> >>> 2) Lua scripts must be able to receive Core internals, for more details >>> i suggest you check the STAGE_30 where handler receives the context of the >>> request. >>> >>> note: check the getting_started page, specifically the blog post about >>> Monkey internals. >>> >>> regards, >>> >> >> > > > -- > Eduardo Silva > http://edsiper.linuxchile.cl > http://monkey-project.com >
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
