Skip to content

Twitter-Snowflake,64位自增ID算法的ngx_lua实现

Notifications You must be signed in to change notification settings

yunfengmeng/lua-resty-snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Name

lua-resty-snowflake - lua Twitter-Snowflake implement for the ngx_lua

Status

This library is considered production ready.

Description

This Lua library is a Twitter-Snowflake implement for the ngx_lua nginx module:

Synopsis

local snowflake = require "resty.snowflake"

local machine_id = 100

local id_str, timestamp, mid, inc = snowflake.generate_id(machine_id)
local timestamp, mid, inc snowflake.decode_id(id_str)

Requires

  1. Lua Bit Operations Module: http://bitop.luajit.org/

TODO

See Also

About

Twitter-Snowflake,64位自增ID算法的ngx_lua实现

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages