example

command module
v0.0.0-...-cf4f4d9 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 9 Imported by: 0

README

Simple example of the generated service.

It serves 2 protocols: HTTP (REST) and GRPC. Both are using the same handler for business logic.

Each protocol has corresponding autogenerated client.

Example is able to run 3 binaries:

  • server (with a middleware to recover from panics)
  • HTTP client
  • GRPC client

Everything is generated from sum.proto.

How to run

Server

make run-server

HTTP client

make run-client-http

GRPC client

make run-client-grpc

Regenerate protobuf

make build

If you also want to regenerate the implementation

To force rebuild all files during generation, change force=false to force=true in the Makefile.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package sum is a self-registering gRPC and JSON+Swagger service definition.
Package sum is a self-registering gRPC and JSON+Swagger service definition.
static

Jump to

Keyboard shortcuts

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