改名
This commit is contained in:
+10
-6
@@ -49,23 +49,20 @@ use ReflectionException;
|
|||||||
protected function create(): array
|
protected function create(): array
|
||||||
{
|
{
|
||||||
$rpcPort = Config::get('rpc.port');
|
$rpcPort = Config::get('rpc.port');
|
||||||
return [
|
$defaultConfig = [
|
||||||
"ID" => "rpc.json.{$this->service}." . $this->uniqueId,
|
"ID" => "rpc.json.{$this->service}." . $this->uniqueId,
|
||||||
"Name" => $this->service,
|
"Name" => $this->service,
|
||||||
"EnableTagOverride" => false,
|
"EnableTagOverride" => false,
|
||||||
"TaggedAddresses" => [
|
"TaggedAddresses" => [
|
||||||
"lan" => [
|
"lan_ipv4" => [
|
||||||
"address" => "127.0.0.1",
|
"address" => "127.0.0.1",
|
||||||
"port" => $rpcPort
|
"port" => $rpcPort
|
||||||
],
|
],
|
||||||
"wan" => [
|
"wan_ipv4" => [
|
||||||
"address" => Network::local(),
|
"address" => Network::local(),
|
||||||
"port" => $rpcPort
|
"port" => $rpcPort
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"Meta" => $this->meta,
|
|
||||||
"Address" => Network::local(),
|
|
||||||
"Port" => $rpcPort,
|
|
||||||
"Check" => [
|
"Check" => [
|
||||||
"CheckId" => "service:rpc.json.{$this->service}." . $this->uniqueId,
|
"CheckId" => "service:rpc.json.{$this->service}." . $this->uniqueId,
|
||||||
"Name" => "service " . $this->service . ' health check',
|
"Name" => "service " . $this->service . ' health check',
|
||||||
@@ -77,6 +74,13 @@ use ReflectionException;
|
|||||||
"DeregisterCriticalServiceAfter" => "30s"
|
"DeregisterCriticalServiceAfter" => "30s"
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
if (!empty($this->meta)) {
|
||||||
|
$defaultConfig["Meta"] = $this->meta;
|
||||||
|
}
|
||||||
|
if (!empty($this->tags)) {
|
||||||
|
$defaultConfig["tags"] = $this->tags;
|
||||||
|
}
|
||||||
|
return $defaultConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user