Skip to content
/ bricks Public

A standard library for microservices.

License

Notifications You must be signed in to change notification settings

pace/bricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3f2c85e · Feb 9, 2024
Nov 16, 2021
Dec 21, 2023
Jun 11, 2022
Jan 16, 2023
Mar 24, 2023
Jul 4, 2022
Jan 25, 2024
Mar 24, 2023
Jul 1, 2022
Feb 9, 2024
Mar 23, 2023
Apr 4, 2019
Jan 28, 2022
Jan 16, 2024
Jan 5, 2020
Jun 7, 2023
Jun 24, 2019
Feb 19, 2019
Sep 22, 2022
Sep 3, 2021
Feb 9, 2024
Jan 16, 2024
Jan 16, 2024
Nov 16, 2022
Jan 5, 2020
Sep 22, 2022

Repository files navigation

PACE Bricks Golang CI Coverage Status

Opinionated microservice kit to help developers to build microservices with go.

Opinions

A pace/bricks microservice is:

  • built as a docker container
  • deployed into a kubernetes cluster
    • support for the termination log
  • configured using environment variables (TWELVE-FACTOR APP)
  • monitored using prometheus
  • reports errors to sentry
  • samples traces to jaeger
  • logs to stdout using json deployed kubernetes otherwise human readable
  • offers health endpoints
  • built-in redaction of JWTs and card schemes
  • connects to backend services
    • postgres (logging, metrics, tracing, health)
    • redis (logging, metrics, tracing, health)
    • queue via redis (logging, metrics, tracing, health)
    • http (logging, metrics, tracing, retries)
    • s3 via http (logging, metrics, tracing, health)
    • couchdb via http (logging, metrics, tracing, retries, health)
    • grpc (logging, metrics, tracing, retries)
  • provides two commands control and daemon
  • provides a RESTful API
    • code is generated from the OpenAPIv3 spec
    • authenticated via OAuth2
    • encoded using json:api
    • that supports logging, tracing and metrics
  • optionally provides a GRPC API
    • code is generated from the protoc spec
    • that supports logging, tracing and metrics

Install

go get github.com/pace/bricks/cmd/pb

Usage

pb -h

Contributing

Read our contributors guide.

Requirements

  • A working go installation
  • A working git installation

Testing

  • Use make test to test without dependencies
  • Use docker-compose run testserver make integration to test with dependencies
  • Use make testserver to start a testserver that will be started with dependencies. In order to update the server one need to docker-compose restart testserver

Environment variables for the pb command

Variable Description
PACE_BRICKS_EDITOR   The path to the editor that should be used for opening a project. Defaults to $EDITOR.
PACE_BRICKS_PATH The path where new project should be created. Defaults to $HOME/PACE.