校区服务

This commit is contained in:
Aether
2025-09-18 15:54:38 +08:00
parent 0920cef866
commit 30e00c5949
15 changed files with 486 additions and 240 deletions

View File

@@ -1,30 +1,30 @@
<?php
declare(strict_types=1);
use function Hyperf\Support\env;
return [
'enable' => [
'discovery' => true,
'register' => true,
],
'consumers' => [],
'providers' => [],
'drivers' => [
'enable' => true,
'driver' => 'nacos',
'registries' => [
'nacos' => [
// nacos server url like https://nacos.hyperf.io, Priority is higher than host:port
// 'url' => '',
// The nacos host info
'host' => env('NACOS_HOST', '127.0.0.1'),
'port' => env('NACOS_PORT', 8848),
// The nacos account info
'username' => null,
'password' => null,
'guzzle' => [
'config' => null,
'username' => env('NACOS_USERNAME', 'nacos'),
'password' => env('NACOS_PASSWORD', 'nacos'),
'namespace' => env('NACOS_NAMESPACE', 'public'),
'group_name' => env('NACOS_GROUP_NAME', 'DEFAULT_GROUP'),
'service_name' => env('NACOS_SERVICE_NAME', 'hyperf-organization'),
'protect_threshold' => 0.5,
'metadata' => [
'protocol' => 'jsonrpc-http',
'server' => 'jsonrpc-http',
'version' => '1.0.0',
'weight' => 100,
],
'group_name' => 'api',
'namespace_id' => env('NACOS_NAMESPACE', 'dev'),
'heartbeat' => 5,
'heartbeat_timeout' => 15,
],
],
];