grpc-service

command module
v0.0.0-...-66c088b Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: ISC Imports: 12 Imported by: 0

README

Build Status

grpc-service

This is intended to be used as a template for scaffolding a new service.

This is an example of a service that the service domain is sliced vertically. You can find a more in-depth discussion about different ways of slicing the service domain here.

Features and Specs

Supported features:

  • RPC API
  • Containerized
  • Health Checks
  • Graceful Shutdown
  • Logging, Metrics, and Tracing
Specifications Technologies
Programming Language Go
Containerization Docker
Transport/Wire Protocol Protocol Buffers
Interface Description/Definition Language (IDL) gRPC
Observability (Logging, Metrics, and Tracing) OpenTelemetry

API

Endpoint Description
GreetingService::Greet Creates and returns a greeting for a given name.

Development

Make
Rule Description
test Runs the unit tests with -race flag.
test-short Runs the unit tests with -short flag.
test-coverage Runs the unit tests and generates coverage reports (c.out and coverage.html).
clean-test Deletes files generated by tests.
run Runs the application.
build Builds the application binary.
build-all Builds the application binary for all supported platforms.
clean-build Deletes built binaries.
docker Builds the Docker image.
docker-test Builds the test Docker image.
push Pushes the built Docker image to container registry.
push-latest Tags the built Docker image as latest and pushes it to container registry.
save-docker Saves the built Docker image to the disk.
load-docker Loads the Docker image from the disk.
clean-docker Deletes the saved Docker image from the disk.
protoc Installs the latest version of Protocol Buffers compiler.
protoc-gen-go Installs the latest version of Protocol Buffers plugin for Go.
protobuf Generates Go codes for the .proto files in idl directory.
Docker Compose
Command Description
docker-compose up -d service Brings up the service in a Docker container.
docker-compose run unit-test Runs the unit tests in a Docker container.
docker-compose down Removes all containers spun up by the docker-compose command.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg
client
Package client defines the interface for a generic client (external service, database, message queue, etc.).
Package client defines the interface for a generic client (external service, database, message queue, etc.).

Jump to

Keyboard shortcuts

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