Instantly share code, notes, and snippets.

Embed
What would you like to do?
These are a set of guidelines to follow when writing any new component on the karix.io platform

Karix.io: Development Guidelines

These are a set of guidelines to follow when writing any new component on the karix.io platform

Dockerfile/Jenkinsfile

  • Every component must have a Dockerfile
  • Every component must have a Jenkinsfile
  • Jenkinsfile will be used to build the container and push it to the registry

Logging

Chaining Logs

  • All internal requests to different components must include X-RequestID HTTP header or x-requestid metadata in gRPC

Dependency management

  • Use dep to manage go dependencies.
  • Don't commit the vendor folder to the source repository

Configuration files

  • Config files must be separate from the source code
  • Config files should be written in a way they can be mounted on a container
  • It should be templatized, and generated based on the environment (prod, dev, stage)
  • Go repositories to use https://github.com/spf13/viper to read config

Testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment