You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use-case for this would be for interacting (populating) Memcached directly from NJS (in a non-hack way). Of course there would be many other use-cases - for various TCP/UDP services.
The text was updated successfully, but these errors were encountered:
@zizifn It cannot be done properly with njs directly at present.
The hack way to do it with njs is to make a http fetch (or via a subrequest + proxy_pass) request to a local Stream Context Virtual Server that contains a js_filter script, and have that script then manipulate request into whatever the protocol should be (and likewise back-translate to response to http) - which sort of works for simple protocols - see memcached.
However, I wouldn't recommend using this approach if you have other options...
In a similar fashion to OpenResty's ngx.socket.tcp
My use-case for this would be for interacting (populating) Memcached directly from NJS (in a non-hack way). Of course there would be many other use-cases - for various TCP/UDP services.
The text was updated successfully, but these errors were encountered: