1
0
Fork 0

Migrate from libkv to valkeyrie library

This commit is contained in:
NicoMen 2018-01-24 17:52:03 +01:00 committed by Traefiker
parent a91080b060
commit 563a0bd274
33 changed files with 109 additions and 115 deletions

View file

@ -10,9 +10,9 @@ import (
"strconv"
"strings"
"github.com/abronan/valkeyrie"
"github.com/abronan/valkeyrie/store"
"github.com/containous/flaeg"
"github.com/docker/libkv"
"github.com/docker/libkv/store"
"github.com/mitchellh/mapstructure"
)
@ -27,11 +27,11 @@ type KvSource struct {
// NewKvSource creates a new KvSource
func NewKvSource(backend store.Backend, addrs []string, options *store.Config, prefix string) (*KvSource, error) {
kvStore, err := libkv.NewStore(backend, addrs, options)
kvStore, err := valkeyrie.NewStore(backend, addrs, options)
return &KvSource{Store: kvStore, Prefix: prefix}, err
}
// Parse uses libkv and mapstructure to fill the structure
// Parse uses valkeyrie and mapstructure to fill the structure
func (kv *KvSource) Parse(cmd *flaeg.Command) (*flaeg.Command, error) {
err := kv.LoadConfig(cmd.Config)
if err != nil {