Skip to content

Simple gRPC example with cockroachdb, migration, healcheck

Notifications You must be signed in to change notification settings

nvcnvn/simple-grpc

Repository files navigation

How to run

  • Install docker-compose
  • Clonse this repo, cd to repo folder
  • Start the app by docker-compose up db migration app
  • Run the integration test by docker-compose up integration_tests

Project structure

.
├── README.md
├── grpc // gRPC .proto spec and generated file
│   └── server // executable server
├── integration_tests // integration test suite
├── migrations // migrations scrip use with go-migrate
├── repositories // entity definition
│   └── sql // cockroachdb implementation
├── scripts // utility script
└── services // services implementation

What need to be done

  • maybe implement generic service handler (not depend on .proto type)
  • better tracing, logging support from grpc-ecosysten
  • clean tests code (I wirte them in rust with lot of copy/paste)
  • HealthcheckService to check migration state
  • a build env with Dockerfile with proto compiler, gogoslick
  • a 'cache' Dockerfile to share betwee, app and integration_tests for save time pulling deps
  • maybe better to have a Docker with auto-rebuild app

About

Simple gRPC example with cockroachdb, migration, healcheck

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published