Skip to content

bcarter97/grpc-echo-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpc-echo-server

A simple gRPC server that takes a Status Code and returns a response after the configured delay.

If the Status Code is an error (greater than 0), this will be raised as a gRPC error.

Example

OK

grpcurl --emit-defaults -plaintext -d '{"code": 0, "delay": 10}' localhost:4770 io.github.bcarter97.echo.v1.Echo/Echo

{
  "code": 0,
  "delay": "10"
}

Error

grpcurl -plaintext -d '{"code": 14, "delay": 500}' localhost:4770 io.github.bcarter97.echo.v1.Echo/Echo

ERROR:
  Code: Unavailable
  Message: UNAVAILABLE after 500 milliseconds

Configuration

Environment variable Default
LOG_LEVEL INFO
GRPC_SERVER_HOST 0.0.0.0
GRPC_SERVER_PORT 4770
GRPC_CLIENT_HOST NA
GRPC_CLIENT_PORT NA

About

gRPC server that response with a status after the given delay

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages