Skip to content

onlyshow/hello-sequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-sequence

基于snowflake算法的发号器

  • 安装依赖 pecl install apcu && pecl install swoole && composer install

  • 启动服务 php start.php

  • 获取id

$redis = new Predis\Client([ 'scheme' => 'tcp', 'host' => '0.0.0.0', 'port' => 9999, ]);

$id = $redis->executeRaw(['sequence']);

Releases

No releases published

Packages

No packages published

Languages