pb/

directory
v0.0.0-...-ed063ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2021 License: MIT

README

gRPC contracts and generated code

This directory contains a sub-directory for each gRPC service

The service directory contains another sub-directory called pb as well: pb/<service>/pb. The internal pb directory contains the following files:

  • .proto file: gRPC contract)
  • .pb.go: Go server and client generated code
  • _pb2.py: Python generated code
  • _pb2_grpc.py: Python class called Stub used by Python clients

The purpose of this directory is to serve as shared code for both gRPC services and gRPC clients because the generated code is a mix of both service and client code. Putting this code with the gRPC service itself means that client code would have to import the service code, which is a violation of separation of concerns.

Directories

Path Synopsis
news_service
pb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL