Repository URL to install this package:
Version:
1.0.3-1.el8 ▾
|
local _M = { _VERSION = '1.0' }
local ffi = require "ffi"
local ffi_cast = ffi.cast
local ffi_str = ffi.string
ffi.cdef[[
struct lua_resty_limit_req_rec {
unsigned long excess;
uint64_t last; /* time in milliseconds */
/* integer value, 1 corresponds to 0.001 r/s */
};
]]
function _M.cast(const_rec_ptr_type, v)
return ffi_cast(const_rec_ptr_type, v)
end
function _M.new()
return ffi.new("struct lua_resty_limit_req_rec")
end
function _M.sizeof()
return ffi.sizeof("struct lua_resty_limit_req_rec")
end
function _M.typeof()
return ffi.typeof("const struct lua_resty_limit_req_rec*")
end
function _M.tostring(rec_cdata, rec_size)
return ffi_str(rec_cdata, rec_size)
end
return _M