php - 如何从 Proto 规范中获取 PHP 的服务(服务器文件)?
问题描述
尽管 PHP 服务器不受官方支持,但我不应该从 protoc+grpc_php_plugin 获得服务吗?跑步:
#!/usr/bin/env bash
protoc --proto_path=./ \
--php_out=./generated \
--grpc_out=./generated \
--plugin=protoc-gen-grpc=../../../../grpc/bins/opt/grpc_php_plugin \
./greeter.proto
超过:
syntax = "proto3";
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloReply {
string message = 1;
}
我只得到GreeterClient.php
. 我不应该也得到一个GreeterService.php
吗?
解决方案
推荐阅读
- java - 如何使用服务器基础目录和 settings.xml 在 IntelliJ 中配置 JBoss 服务器
- spring - 使用 JWT 的 Spring Boot 授权
- java - 从 FirebaseFirestore 检索文档数组 --> Java Android
- android - 以编程方式回复 Android 中 Whats-app 的通知
- swagger - Springdoc-openapi 具有相对路径的外部 json 文件,例如请求正文
- sql - 是否可以在单个查询中编写两个具有两个条件的 UPDATE 函数?
- javascript - 如何使用画布drawimage函数根据纵横比裁剪图像中心反应原生
- python - 如何在scrapy中将前缀包含str添加到列表中
- r - 将 data.table 功能添加到 sf 对象
- amazon-web-services - s3 生命周期规则是否覆盖拒绝删除存储桶或 DeleteObject 策略是 s3 存储桶?