mrlaozhou/laravel-yar

There is no license information available for the latest version (v1.1.1) of this package.

Laravel-Yar 基于PHP yar实现了Laravel完全兼容Route模式的RPC

v1.1.1 2019-04-28 04:21 UTC

This package is not auto-updated.

Last update: 2024-04-22 05:17:08 UTC


README

Laravel-Yar 基于PHP yar实现了Laravel完全兼容Route模式的RPC

Yar Document

安装

composer install mrlaozhou/laravel-yar

config/app.php下加入

\Mrlaozhou\Yar\LaravelServiceProvider::class

创建 routes/yar.php文件

Server

创建一个HTTP RPC Server

$server	= new \Mrlaozhou\Yar\Server($classInstance)
$server->handle()

or

\Mrlaozhou\Yar\Server::boot($classInstace)

Client

创建客户端实例

new \Mrlaozhou\Yar\Clent()

调用远程服务

$client->{$method}()

or

$client->touch()

concurrent

同\Yar_Concurrent_Client