This commit is contained in:
2022-03-17 10:42:50 +08:00
parent 734db55904
commit ffc9b57cad
13 changed files with 16 additions and 94 deletions
+1
View File
@@ -222,6 +222,7 @@ class Application extends BaseApplication
}
/**
* @param Command $class
* @param $input
-2
View File
@@ -12,8 +12,6 @@ namespace Gii;
use Database\Connection;
use Database\Db;
use Exception;
use Kiri\Redis\Redis;
use Kiri;
use Symfony\Component\Console\Input\InputInterface;
/**
+1
View File
@@ -11,6 +11,7 @@ use Kiri\Core\Json;
use ReflectionClass;
use ReflectionException;
use Symfony\Component\Console\Input\InputInterface;
use const APP_PATH;
/**
* Class GiiBase
+1 -1
View File
@@ -5,9 +5,9 @@ namespace Gii;
use Exception;
use Kiri;
use Kiri\Abstracts\Config;
use Kiri\Exception\ConfigException;
use Kiri;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
+2 -1
View File
@@ -5,8 +5,9 @@ declare(strict_types=1);
namespace Gii;
use Exception;
use ReflectionException;
use Kiri;
use ReflectionException;
use function logger;
/**
* Class GiiController
+1
View File
@@ -7,6 +7,7 @@ namespace Gii;
use Exception;
use Kiri;
use const APP_PATH;
/**
* Class GiiMiddleware
+2 -2
View File
@@ -5,10 +5,10 @@ declare(strict_types=1);
namespace Gii;
use Database\Db;
use Database\Model;
use Exception;
use ReflectionException;
use Kiri;
use ReflectionException;
use function logger;
/**
* Class GiiModel
+1 -1
View File
@@ -6,9 +6,9 @@ namespace Gii;
use Exception;
use Kiri;
use Kiri\Abstracts\Providers;
use Kiri\Application;
use Kiri;
/**
* Class DatabasesProviders
+1
View File
@@ -6,6 +6,7 @@ namespace Gii;
use Exception;
use Kiri;
use const APP_PATH;
/**
* Class GiiRpcClient
+1
View File
@@ -6,6 +6,7 @@ namespace Gii;
use Exception;
use Kiri;
use const APP_PATH;
/**
* Class GiiRpcClient
+1
View File
@@ -6,6 +6,7 @@ namespace Gii;
use Exception;
use Kiri;
use const APP_PATH;
/**
* Class GiiModel
+1 -86
View File
@@ -1,90 +1,5 @@
<?php
//
//function after(Process $process)
//{
// Timer::after(random_int(500, 2000), function () use ($process) {
// $process->write("11111");
//
// after($process);
// });
//}
//
//
//function read(Process $process, Coroutine\Channel $channel)
//{
// $data = $process->read();
//
// $channel->push($data);
//
// var_dump($channel->length());
//
// read($process, $channel);
//}
//
//$process = new Process(function (Process $process) {
//
// $array = new Coroutine\Channel(9999999);
//
// $barrier = Barrier::make();
//
// Coroutine::create('read', $process, $array);
// Coroutine::create(function (Coroutine\Channel $channel) {
// var_dump(1111);
// function ch(Coroutine\Channel $channel) {
// $data = $channel->pop();
//
// var_dump($data);
//
// ch($channel);
// };
// ch($channel);
// }, $array);
// Barrier::wait($barrier);
//}, null, SWOOLE_UNIX_STREAM, true);
//$process->start();
//
//Coroutine\run(function () use ($process) {
// after($process);
//});
var_dump(json_encode([
"Datacenter" => "dc1",
"Node" => "iz8vbi3edjyskl7kpuwudqz",
"SkipNodeUpdate" => FALSE,
"Service" => [
"ID" => "redis1",
"Service" => "FriendRpcService",
"Address" => "172.26.221.211",
"TaggedAddresses" => [
"lan" => [
"address" => "127.0.0.1",
"port" => 9627,
],
"wan" => [
"address" => "172.26.221.211",
"port" => 9627,
],
],
"Meta" => [
"redis_version" => "4.0",
],
"Port" => 9627,
],
"Check" => [
"Node" => "iz8vbi3edjyskl7kpuwudqz",
"CheckId" => "service:redis1",
"Name" => "Redis health check",
"Notes" => "Script based health check",
"Status" => "passing",
"ServiceID" => "redis1",
"Definition" => [
"Http" => "http://172.26.221.211:9627",
"Interval" => "5s",
"Timeout" => "1s",
"DeregisterCriticalServiceAfter" => "30s",
],
],
]));
var_dump(30 / 60);
+3 -1
View File
@@ -8,6 +8,8 @@
word-break: break-all;
white-space: pre-wrap;
word-wrap: break-word;
overflow-y: scroll;
overflow: hidden;
}
</style>
</head>
@@ -48,7 +50,7 @@
}
function connect() {
sock = new WebSocket('ws://localhost:8080/websocket');
sock = new WebSocket('ws://127.0.0.1:9528/222');
sock.onopen = function () {
if (tick) {
clearInterval(tick)