改名
This commit is contained in:
+11
-4
@@ -3,7 +3,10 @@
|
||||
namespace Kiri\Rpc;
|
||||
|
||||
|
||||
use Kiri\Kiri;
|
||||
use Kiri\Pool\Pool;
|
||||
use SensioLabs\Consul\ServiceFactory;
|
||||
use SensioLabs\Consul\Services\Agent;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -19,34 +22,38 @@ class Consumers implements OnRpcConsumerInterface
|
||||
|
||||
|
||||
/**
|
||||
* @param string $service
|
||||
* @param string $method
|
||||
* @param mixed $data
|
||||
* @param string $version
|
||||
*/
|
||||
public function notify(string $method, mixed $data, string $version = '2.0'): void
|
||||
public function notify(string $service, string $method, mixed $data, string $version = '2.0'): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $service
|
||||
* @param string $method
|
||||
* @param mixed $data
|
||||
* @param string $version
|
||||
* @param string $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $method, mixed $data, string $version = '2.0', string $id = ''): mixed
|
||||
public function get(string $service, string $method, mixed $data, string $version = '2.0', string $id = ''): mixed
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function get_consul()
|
||||
private function get_consul($service)
|
||||
{
|
||||
$sf = Kiri::getDi()->get(\Kiri\Consul\Agent::class);
|
||||
|
||||
$content = $sf->service->service($service)->getBody()->getContents();
|
||||
|
||||
|
||||
$content = json_decode($content, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user