Download the PHP package huo-zi/laravel-yar-rpc-client without Composer

On this page you can find all versions of the php package huo-zi/laravel-yar-rpc-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-yar-rpc-client

Laravel YAR RPC Client

基于 Laravel 框架服务注册及门面的 YAR 客户端,提供优雅的 YAR RPC 服务调用。

功能特性

依赖要求

安装

配置

1. 发布配置文件

2. 配置 RPC 服务端

编辑 config/yar_client.php 文件:

使用

1. 生成 Facade

此命令会自动:

2. 调用 RPC 方法

3. 并发调用

支持并发调用多个 RPC 服务,提高请求效率:

3.1 魔术方法调用(推荐)

使用魔术方法调用:

3.2 使用 call() 方法调用

使用 call() 方法调用:

3.3 结果格式

并发调用特点:

配置选项说明

配置项 默认值 说明
namespace App\Rpc\Clients\ Facade 类生成目录
options.timeout 5000ms 调用超时时间
options.connect_timeout 1000ms 连接超时时间
options.packager php 序列化方式
options.persistent true 是否启用持久连接

服务注册原理

服务提供者已实现 DeferrableProvider 接口,支持延迟加载:

延迟加载机制:

更新配置后的缓存清理

当你更新了 config/yar_client.php 中的客户端配置后,需要清理以下缓存文件:

注意: 在生产环境中更新 RPC 配置后,务必执行缓存清理,否则新配置不会生效。

License

MIT License


All versions of laravel-yar-rpc-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
ext-yar Version *
laravel/framework Version ~5.8|~6.0|~7.0|~8.0|~9.0|~10.0|~11.0|~12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package huo-zi/laravel-yar-rpc-client contains the following files

Loading the files please wait ...