Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/adhityaramadhanus/minerva

minerva is remote config library using redis as configuration management
https://github.com/adhityaramadhanus/minerva

configuration-management redis

Last synced: 12 days ago
JSON representation

minerva is remote config library using redis as configuration management

Awesome Lists containing this project

README

        

# minerva
[![Build Status](https://travis-ci.org/AdhityaRamadhanus/minerva.svg?branch=master)](https://travis-ci.org/AdhityaRamadhanus/minerva)

configuration management using redis


Installation |
Usage |
Todo |
License




minerva is remote config library using redis as configuration management

Installation
-----------
* go get github.com/AdhityaRamadhanus/minerva

Usage
----------------
* See examples for more details
```go
package main

import (
"log"
"os"
"time"

"github.com/AdhityaRamadhanus/minerva"
redis "github.com/AdhityaRamadhanus/minerva/redis"
)

func main() {
// Create your service provider, currently only redis is implemented
redisService := redis.NewRedisService(&redis.Options{
Addr: "localhost:6379",
DB: 0,
})

minerva := minerva.New(redisService)
// you can watch any change on the config by calling Watch function
minerva.Watch()
for {
if minerva.Get("is-maintenance") == "true" {
log.Println("Server is in maintenance")
minerva.Close()
os.Exit(0)
}
log.Println("Serving Request")
time.Sleep(1 * time.Second)
}
}
```

Todo
----------------
* ~~Dynamic prefix key~~
* Bootstrap config value
* CLI to manage configuration
* ~~More robust and proper error handling~~
* Add debouncing in getting key value on parsing key event
* ~~Add test~~
* ~~Add CI~~

License
----

MIT © [Adhitya Ramadhanus]