Loading...
This site is best viewed in a modern browser with JavaScript enabled.
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
openresty thrift 客户端的支持
xiajun868
前段时间有个项目要在openresty 中调用thrift客户端,让thrift lua客户端支持thrift其实也不难,直接替换掉原生lua客户端中调用阻塞socket的 api就行。
thrift lua原生客户端都是使用全局变量不太符合openresty的使用,于是稍微改了一下。下面是从项目中剥离出来稍微封装了一下(目前还比较简陋):
lua-resty-thrift
https://github.com/xiajunsongfan/lua-resty-thrift