This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tarantool | |
-- Sets common rocks paths so that the app can be started from any | |
-- directory | |
-- | |
-- By default, when you do require('mymodule'), tarantool looks into | |
-- the current working directory and whatever is specified in | |
-- package.path and package.cpath. If you run your app while in the | |
-- root directory of that app, everything goes fine, but if you try to | |
-- start your app with "tarantool myapp/init.lua", it will fail to load | |
-- its modules, and modules from myapp/.rocks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Account", | |
"type": "record", | |
"logicalType": "Aggregate", | |
"fields": [ | |
{"name": "id", "type": "int"}, | |
{"name": "name", "type": ["null", "string"], "default": null} | |
], | |
"indexes": ["id", "name"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- RSA bindings for Tarantool | |
--- Carefully adapted from https://github.com/spacewander/lua-resty-rsa | |
local bit = require "bit" | |
local band = bit.band | |
local ffi = require "ffi" | |
local ffi_new = ffi.new | |
local ffi_gc = ffi.gc | |
local ffi_copy = ffi.copy | |
local ffi_str = ffi.string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tarantool | |
local net_box = require('net.box') | |
local fiber = require('fiber') | |
local clock = require('clock') | |
local CONN_STRING = 'localhost:3301' -- SET UP CONECTION STRING TO YOUR ROUTER / PLAIN TARANTOOL | |
local WORKER_COUNT = 256 -- SET UP NUMBER OF PARALLEL REQUESTS HERE | |
local conn = assert(net_box.connect(CONN_STRING)) |
OlderNewer