gRPC Awesome
- grpc-ecosystem/grpc-gateway
- gRPC -> OpenAPIv2
 - grpc-ecosystem/grpc-gateway#441
- OpenAPIv3
 
 - grpc-ecosystem/protoc-gen-grpc-gateway-ts
- Apache-2.0, Golang
 
 
 - google/gnostic
- OpenAPI <-> gRPC
 - 支持 OpenAPIv3
 
 - grpc/grpc-web
- gRPC in Web
 - 需要代理
 
 - google/rejoiner
- Java
 - gRPC -> GraphQL
 
 - ysugimoto/grpc-graphql-gateway
 - grpc-ecosystem/awesome-grpc
 - Web
- bufbuild/protobuf-es
- protobuf-ts 相同作者,可能后期工作会更倾向于该项目
 - from protobuf-ts
- 通过 @bufbuild/protobuf 使用 Well-known types 而不是本地生成的
 - 基于 class
 
 
 - timostamm/protobuf-ts
- 依赖 tsc 生成代码
 
 
 - bufbuild/protobuf-es
 
LB/Gateway/Proxy
- grpc.lb.v1.LoadBalancer
 - gRPC-aware proxy/Load balance
 - liyue201/grpc-lb
- 客户端使用 google.golang.org/grpc/resolver.Register 注册 LB 实现
 
 - gotway/gotway
 - mmontes11/go-grpc-routes
 - https://grpc-ecosystem.github.io/grpc-gateway/
 - https://pkg.go.dev/go.chromium.org/luci/grpc/discovery
 - mwitkow/grpc-proxy
 - siderolabs/grpc-proxy
- one-to-many proxying and result aggregation.
 
 - etcd grpc-proxy
 
参考
- wenerme/grpc-protos
 - Practical API Design at Netflix, Part 1: Using Protobuf FieldMask
 - googleapis/googleapis
 - https://github.com/kubernetes/cri-api/blob/master/pkg/apis/runtime/v1/api.proto
 - https://github.com/kubernetes/api/blob/master/core/v1/generated.proto
 - https://github.com/tensorflow/serving/tree/master/tensorflow_serving/apis
 - https://github.com/asim/go-micro/blob/master/api/proto/api.proto
 - https://github.com/kubeflow/katib/tree/master/pkg/apis
 - https://github.com/p4lang/p4runtime/tree/main/proto/p4/v1
 - https://github.com/onosproject/onos-api/tree/master/proto
 - https://github.com/thanos-io/thanos/search?p=1&q=in%3Apath+proto
 
工具
- Kong/insomnia
 - bloomrpc/bloomrpc
- GUI for GRPC
 
 - getezy/ezy
- MPL-2.0, TS
 - GUI gRPC/gRPC-Web client
 
 - envoyproxy/protoc-gen-validate
- 生成校验规则
 
 - bufbuild/buf
 - uber/prototool
- 工具集 - 不活跃 - 推荐使用 buf
 - lint, generate
 
 - improbable-eng/grpc-web
- gRPC Web 实现
 - 支持 Websocket 模式
 - improbable-eng/ts-protoc-gen
 
 - google/gnostic
- OpenAPI <-> gRPC
 - 支持 OpenAPIv3
 
 - googleapis/api-linter
 - tmc/grpcutil
 - ktr0731/evans
- expressive universal gRPC client
 
 - containerd/ttrpc
- 轻量 grpc
 - 非 grpc 协议
 
 
UI
- uw-labs/bloomrpc
 - fullstorydev/grpcurl
 - fullstorydev/grpcui
- MIT, Go,JS
 - web UI for gRPC
 - 实现基于 grpcurl
 
 
# brew install grpcui
go install github.com/fullstorydev/grpcui/cmd/grpcui@latest
grpcui -plaintext localhost:12345
# 使用 反射 则不需要 proto 信息
grpcui -use-reflection -base-path /api/rpc -plaintext localhost:18080
- rogchap/wombat
 - warmuuh/milkman
 - IntelliJ IDEA v2021.3+ HTTP Client 支持 gRPC
 
### helloworld
GRPC localhost:8888/helloworld.Greeter/SayHello
### health
GRPC localhost:8888/grpc.health.v1.Health/Check
- Reflection
- grpc.reflection.v1.ServerReflection
 - grpc.reflection.v1alpha.ServerReflection
 - bufbuild/connect-grpcreflect-go
 
 - grpc.health.v1.Health
 
Health
- https://github.com/grpc/grpc/blob/master/doc/health-checking.md
 - grpc-ecosystem/grpc-health-probe
 - apssouza22/grpc-production-go
 
syntax = "proto3";
package grpc.health.v1;
message HealthCheckRequest {
  string service = 1;
}
message HealthCheckResponse {
  enum ServingStatus {
    UNKNOWN = 0;
    SERVING = 1;
    NOT_SERVING = 2;
    SERVICE_UNKNOWN = 3;  // Used only by the Watch method.
  }
  ServingStatus status = 1;
}
service Health {
  rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
  rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
}
RPC
- smallnest/rpcx
- 国内项目
 
 - twitchtv/twirp
- 使用 grpc 的服务定义和序列化
 
 
gen
- protoc plugins
 - protoc-gen-go-grpc
 - protoc-gen-grpc
 - protoc-gen-grpc-gateway
 - protoc-gen-grpc-java
 - protoc-gen-grpc-web
- planetscale/vtprotobuf
- 优化基于 gogo - 使用 APIv2
 - 支持 Pool
 - 增加一些简单的辅助方法
 
 
 - planetscale/vtprotobuf
 - protoc-gen-go-drpc
- storj/drpc
- 一个更加简单轻量的 RPC 协议
 
 
 - storj/drpc
 
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go install github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts@latest
go install github.com/envoyproxy/protoc-gen-validate@latest
#
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@latest
go install github.com/srikrsna/protoc-gen-gotag@latest
go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
# 调用单个 插件
protoc -I . helloworld.proto --doc_out .
version: v1
managed:
  enabled: true
  go_package_prefix:
    default: github.com/wenerme/torrenti/pkg/apis
    except:
      - buf.build/x/bundle
      - buf.build/googleapis/googleapis
      - buf.build/envoyproxy/protoc-gen-validate
plugins:
  - name: go
    out: .
    opt: paths=source_relative
  #  - name: gotag
  #    out: .
  #    opt: paths=source_relative
  - name: go-grpc
    out: .
    opt: paths=source_relative,require_unimplemented_servers=true
  - name: grpc-gateway
    out: .
    opt:
      - paths=source_relative
      - generate_unbound_methods=true
      #- grpc_api_configuration=path/to/config.yaml
      #- standalone=true
  - name: openapiv2
    out: openapiv2
  - name: grpc-gateway-ts
    out: gen/web/api
    opt: paths=source_relative
  - name: doc
    out: gen/doc
    strategy: all
    # <FORMAT>|<TEMPLATE_FILENAME>,<OUT_FILENAME>[,default|source_relative]
    # FORMAT=docbook,html,markdown,json
    # TEMPLATE_FILENAME Go template 文件
    # source_relative 输出基于 input 的相对路径
    opt: markdown,proto.md
 - name: micro # go micro - web proxy & service
   out: .
   opt:
     - paths=source_relative
     - require_unimplemented_servers=false
 - name: validate
   out: .
   opt:
     - lang=go
     - paths=source_relative
syntax = "proto3";
package acme.weather.v1;
option go_package = "github.com/acme/weather/gen/proto/go/acme/weather/v1;weatherv1";
option java_multiple_files = true;
option java_outer_classname = "WeatherProto";
option java_package = "com.acme.weather.v1";