Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

alexferl/go-grpc-helloworld

Repository files navigation

go-grpc-helloworld Go Report Card

A small boilerplate gRPC app based on the Go helloworld with 12-factor.

Building & Running locally

make run

Testing

With gRPCurl:

echo '{"name": "World"}' | grpcurl -plaintext -d @ localhost:50051 helloworld.Greeter/SayHello
{
 "message": "Hello World"
}

Health check:

grpcurl -plaintext localhost:50052 grpc.health.v1.Health/Check
{
 "status": "SERVING"
}

Usage

Usage of ./server:
 --app-name string The name of the application. (default "app")
 --bind-address ip The IP address to listen at. (default 127.0.0.1)
 --bind-port uint The port to listen at. (default 50051)
 --env-name string The environment of the application. Used to load the right configs file. (default "local")
 --graceful-timeout uint Timeout for graceful shutdown. (default 30)
 --health-bind-address ip The IP address to listen at. (default 127.0.0.1)
 --health-bind-port uint The port to listen at. (default 50052)
 --log-level string The granularity of log outputs. Valid log levels: 'panic', 'fatal', 'error', 'warn', 'info', 'debug' and 'trace'. (default "info")
 --log-output string The output to write to. 'stdout' means log to stdout, 'stderr' means log to stderr. (default "stdout")
 --log-writer string The log writer. Valid writers are: 'console' and 'json'. (default "console")

Building & Running Docker container

make build-docker
make run-docker

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /