Logging is configured based on build constraints * Contextual logging: if there is a correlation id in context argument then it will be added to the log statements * Debug builds log plain text to console * Release builds log JSON formatted messages * Added log statements to lock_service.go
Table of Contents
To get a local copy up and running follow these simple steps.
This project provides a Makefile for testing / generating / building the project.
- Clone the repo
git clone https://github.com/stoex/go-lock.git
- Install dependencies
- Generate Code
- Start up a redis instance
- Build the project
make help for a list of available commands.
The program uses environment variables and CLI flags for configuration. To specify which redis clients should be used to connect please specify the following variable:
The variable should be used as a comma separated list - you can specify however many clients you wish to connect to.
During development you can also use a
.env file like so:
echo 'REDIS_CLIENTS=...' > .env
.env file should be placed in the same directory the server is run from.
See the servers available parameters with
-key_fileare not used in conjuction with
-tlsthe server uses certificates from
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature)
- Commit your Changes (
git commit -m 'Add some AmazingFeature')
- Push to the Branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the MIT License. See
LICENSE for more information.
Project Link: https://github.com/stoex/go-lock