> Here's what I wanted to do:
> 1) I wanted to write a Nginx location handler for example "/mylocation"
> which when invoked should call another program to get the response.
> 2) The other external program provides a client library where we can
> register callbacks.
> 3) The external program will call the callback when the data is available.
> I wanted to know if I am using an external library and one of the external
> API is asking for registering callback, how i can achieve this in Nginx.
Take a look at the ngx_drizzle module which integrates the external
client library libdrizzle into the Nginx core and generates outputs
for an nginx location:
Re: Registering Nginx callback in external library
Thanks for your pointers, but one thing I still not understood from the links you have provided is that how I can register a callback in my handler which will be called by the external library.
In the links you have provided the read write event handler is called when any read write happens on the DB. But my case it's the external program who will call the Nginx callback.
So I am not sure how I can pass a callback from Nginx to external library API.