echo/

directory
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: MIT

README

Example gRPC Echo Server

This example server demonstrates how to run gRPC accessible via grpc, grpc-web, and grpc-gateway all on the same port while hosting other HTTP services.

Build

make build

Run

go run main.go

Using

  1. Go to http://localhost:8080 and look at the developer console.
  2. Try curl -XPOST http://localhost:8080/api/v1/echo\?message\=foo
  3. Try grpcurl -plaintext -d='{"message": "hey"}' localhost:8080 proto.rpc.examples.echo.v1.EchoService/Echo

Directories

Path Synopsis
Package main runs a gRPC client over WebRTC connecting to the proto/rpc/examples/echo/v1 service.
Package main runs a gRPC client over WebRTC connecting to the proto/rpc/examples/echo/v1 service.
cmd
Package main runs a gRPC server running the proto/rpc/examples/echo/v1 service.
Package main runs a gRPC server running the proto/rpc/examples/echo/v1 service.

Jump to

Keyboard shortcuts

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