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
lib LibC | |
IPC_CREAT = 0o1000 | |
IPC_EXCL = 0o2000 | |
IPC_NOWAIT = 0o4000 | |
IPC_RMID = 0 | |
IPC_SET = 1 | |
IPC_STAT = 2 | |
IPC_INFO = 3 | |
SHM_LOCK = 3 | |
SHM_UNLOCK = 4 |
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
lib LibC | |
ITIMER_REAL = 0 | |
ITIMER_VIRTUAL = 1 | |
ITIMER_PROF = 2 | |
struct Itimerval | |
it_interval : Timeval | |
it_value : Timeval | |
end | |
struct Timeval |
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
-- Setup Redis connection | |
local redis = require "resty.redis" | |
local red = redis:new() | |
local ok, err = red:connect("127.0.0.1", "6379") | |
if not ok then | |
ngx.log(ngx.INFO, "REDIS: Failed to connect to redis: " .. err) | |
return ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) | |
end |
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
#Simplified for illustrative purposes. | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; |