snowflake.php 650 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. use Hyperf\Snowflake\MetaGenerator\RedisMilliSecondMetaGenerator;
  12. use Hyperf\Snowflake\MetaGenerator\RedisSecondMetaGenerator;
  13. use Hyperf\Snowflake\MetaGeneratorInterface;
  14. return [
  15. 'begin_second' => MetaGeneratorInterface::DEFAULT_BEGIN_SECOND,
  16. RedisMilliSecondMetaGenerator::class => [
  17. 'pool' => 'default',
  18. ],
  19. RedisSecondMetaGenerator::class => [
  20. 'pool' => 'default',
  21. ],
  22. ];