ch08/

directory
v0.0.0-...-85f8b8c Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT, CC-BY-4.0

README

Chapter 8: The gRPC Ecosystem

ProductInfo Service and Client

  • Online retail scenario has a ProductInfo microservice which is responsible for managing the products and their information. The consumer of that service can add, retrieve products via that service.

  • ProductInfo service and the consumer of that service are implemented in both Go and Java languages.

  • This use case shows how you can implement both ProductInfo service and its consumer.

Service Definition

package ecommerce;

service ProductInfo {
    rpc addProduct(Product) returns (google.protobuf.StringValue);
    rpc getProduct(google.protobuf.StringValue) returns (Product);
}

message Product {
    string id = 1;
    string name = 2;
    string description = 3;
    float price = 4;
}

Implementation

Directories

Path Synopsis
grpc-gateway
go/gw
Package ecommerce is a reverse proxy.
Package ecommerce is a reverse proxy.
server-reflection

Jump to

Keyboard shortcuts

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