Download the PHP package zhonghaibin/grpc-service without Composer

On this page you can find all versions of the php package zhonghaibin/grpc-service. 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 grpc-service

通过php实现grpc服务端

php版本: php >= 8.1

安装

创建项目

在安装依赖包的时候,因为有墙等特殊网络原因(懂得都懂),有可能在获取rr二进制可执行文件会超时失败,重新手动获取 rr 可执行文件,在项目根目录打开命令行执行如下命令,我当初就是一直下载不了,导致我构建了个docker镜像。实在是下载不下来rr可执行文件。建议使用下面的Docker 安装和部署,简单又高效。

启动服务(win10)

Docker 安装和部署

个人比较推荐使用Dockerfile构建容器进行部署.

创建项目

进入目录

构建镜像

创建容器

创建一次性容器

进入容器

启动容器

停止容器

删除容器

删除镜像

docker-compose 部署

构建服务

停止

启动

其他命令 自行研究

客户端

我这里用的是ApiPost 支持grpc测试

打开apipost客户端,新建grpc,选择导入proto
选择项目目录的 grpc/protos/base/hello-world.proto 文件

参考文档:

https://roadrunner.dev/docs/plugins-grpc/2023.x/en

1 根据自己的需求创建 hello-world.proto 文件

2 通过 hello-world.proto 生成 php 类文件

目录结构

roadrunner-docker 参考文档

http://github.xiaoc.cn/roadrunner-server/roadrunner


All versions of grpc-service with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
grpc/grpc Version ^1.36
ext-json Version *
spiral/roadrunner-grpc Version *
spiral/roadrunner-services Version ^1.0
spiral/roadrunner-jobs Version ^3.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 zhonghaibin/grpc-service contains the following files

Loading the files please wait ....