Looking for a smidge more info on external type applications
Max Romanov
max.romanov at nginx.com
Tue Mar 26 10:46:54 UTC 2019
Hello,
There is a library (libunit) which may help you to write such external app. Unfortunately, it is not documented and can be changed in next releases, but all language modules written using this library API and you may use it too.
First, have a look at test external application in C: https://github.com/nginx/unit/blob/master/src/test/nxt_unit_app_test.c <https://github.com/nginx/unit/blob/master/src/test/nxt_unit_app_test.c> . In spite of the fact the app is useless, it will give you some clue how to start. Next thing is reading comments in main header file of this library (https://github.com/nginx/unit/blob/master/src/nxt_unit.h <https://github.com/nginx/unit/blob/master/src/nxt_unit.h>). And, of course, you may ask here, if something is still unclear or does not work as expected.
Best regards,
Max
> On 26 Mar 2019, at 03:53 , Shane Spencer <spencersr at gmail.com> wrote:
>
> Hi all. I'm trying to get a generic external application working using python (rather than WSGI). I can see the NXT_USER_INIT environment variable and the PIDs involved and what could possibly be fileno's for potential socket work. I'm going to be giving that a test.
>
> It sounds like the file descriptor may be use for retrieving extra control information (like listen port) however.
>
> Any extra info on external type commands would be awesome. I don't see anything on public github that is parsing the environment variable NXT_USER_INIT to utilize that info. Just trying to determine the next step once a command inits.
>
> <https://about.me/ShaneSpencer?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>
> Shane Spencer
> about.me/ShaneSpencer <https://about.me/ShaneSpencer?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb>_______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20190326/e1b5043c/attachment.html>
More information about the unit
mailing list