定制 spiral/php-grpc 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spiral/php-grpc

最新稳定版本:v1.6.0

Composer 安装命令:

composer require spiral/php-grpc

包简介

High-Performance GRPC server for PHP applications

README 文档

README

⚠️ RRv2 protoc-gen-php-grpc releases are here: https://github.com/roadrunner-server/roadrunner/releases ⚠️
⚠️ PHP Client for the RRv2 is here: https://github.com/spiral/roadrunner-grpc ⚠️

PHP-GRPC

Latest Stable Version GoDoc Tests Linters Go Report Card Total alerts Codecov

PHP-GRPC is an open-source (MIT) high-performance PHP GRPC server build at top of RoadRunner. Server support both PHP and Golang services running within one application.

Note:

For the RoadRunner v2, please use the RR-GRPC library.

Documentation:

Features:

  • native Golang GRPC implementation compliant
  • minimal configuration, plug-and-play model
  • very fast, low footprint proxy
  • simple TLS configuration
  • debug tools included
  • Prometheus metrics
  • middleware and server customization support
  • code generation using protoc plugin (go get github.com/spiral/php-grpc/cmd/protoc-gen-php-grpc)
  • transport, message, worker error management
  • response error codes over php exceptions
  • works on Windows

Usage:

Install rr-grpc and protoc-gen-php-grpc by building it or use pre-build binaries.

Define your service schema using proto file. You can scaffold protobuf classes and GRPC service interfaces using:

$ protoc --php_out=target-dir/ --php-grpc_out=target-dir/ sample.proto

Make sure to install protoc compiler and run composer require spiral/php-grpc first

Implement needed classes and create worker.php to invoke your services.

Place .rr.yaml (or any other format supported by viper configurator) into the root of your project. You can run your application now:

$ rr-grpc serve -v -d

To reset workers state:

$ rr-grpc grpc:reset

To show workers statistics:

$ rr-grpc grpc:workers -i

See example.

You can find more details regarding server configuration at RoadRunner Wiki.

License:

MIT License (MIT). Please see LICENSE for more information. Maintained by SpiralScout.

统计信息

  • 总下载量: 752.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 453
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 453
  • Watchers: 26
  • Forks: 48
  • 开发语言: Go

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固