Ai
1 Star 1 Fork 1

zhen/hyperf_rocketmq

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ConfigProvider.php 2.48 KB
一键复制 编辑 原始数据 按行查看 历史
zhen 提交于 2022-05-25 10:12 +08:00 . 格式化代码
<?php
/**
* @Author: laoweizhen <1149243551@qq.com>,
* @Date: 2022/5/10 23:01,
* @LastEditTime: 2022/5/10 23:01
*/
declare(strict_types=1);
namespace Lwz\HyperfRocketMQ;
use Hyperf\Utils\Packer\JsonPacker;
use Lwz\HyperfRocketMQ\Listener\BeforeMainServerStartListener;
use Lwz\HyperfRocketMQ\Packer\Packer;
class ConfigProvider
{
public function __invoke(): array
{
return [
'dependencies' => [
Producer::class => Producer::class,
Packer::class => JsonPacker::class,
Consumer::class => ConsumerFactory::class,
],
'listeners' => [
BeforeMainServerStartListener::class => 99,
],
'commands' => [],
'annotations' => [
'scan' => [
'paths' => [
__DIR__,
],
],
],
'publish' => [
[
'id' => 'config',
'description' => 'The config for rocketmq.',
'source' => __DIR__ . '/../publish/rocketmq.php',
'destination' => BASE_PATH . '/config/autoload/rocketmq.php',
],
[
'id' => 'mq_status_log_migration',
'description' => 'The mq_produce_status_log migration for rocketmq.',
'source' => __DIR__ . '/../publish/migrations/2022_05_24_172602_create_mq_produce_status_log_table.php',
'destination' => BASE_PATH . '/migrations/rocketmq/2022_05_24_172602_create_mq_produce_status_log_table.php',
],
[
'id' => 'mq_status_log_migration',
'description' => 'The mq_consume_log migration for rocketmq.',
'source' => __DIR__ . '/../publish/migrations/2022_05_24_172643_create_mq_consume_log_table.php',
'destination' => BASE_PATH . '/migrations/rocketmq/2022_05_24_172643_create_mq_consume_log_table.php',
],
[
'id' => 'mq_error_log_migrations',
'description' => 'The mq_error_log migration for rocketmq.',
'source' => __DIR__ . '/../publish/migrations/2022_05_22_141058_create_mq_error_log_table.php',
'destination' => BASE_PATH . '/migrations/rocketmq/2022_05_22_141058_create_mq_error_log_table.php',
],
],
];
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/easy_code/hyperf_rocketmq.git
git@gitee.com:easy_code/hyperf_rocketmq.git
easy_code
hyperf_rocketmq
hyperf_rocketmq
master

搜索帮助