Skip to content

mihail-i4v/echo-server-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Echo

A simple echo server implemented using the gRPC framework.

Running locally

Start the server

go run echo_server/main.go

Run the client

go run echo_client/main.go

Or build the client and run commands

go build -o echo-cli echo_client/main.go
./echo-cli
./echo-cli -input foo

Other commands

Generate code from protocol buffer:

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    echo/echo.proto

Query with grpcurl

cd echo
grpcurl -plaintext -proto ./echo.proto 127.0.0.1:50051 list
grpcurl -plaintext -proto ./echo.proto 127.0.0.1:50051 EchoService.Echo
grpcurl -d '{"input": "bar"}' -plaintext -proto ./echo.proto 127.0.0.1:50051 EchoService.Echo

Check with grpcui

cd echo
grpcui -plaintext -proto echo.proto 127.0.0.1:50051

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages