Add KV datastore

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-08-16 19:13:18 +02:00
parent 38b62d4ae3
commit 5a0440d6f8
No known key found for this signature in database
GPG key ID: D808B4C167352E59
21 changed files with 498 additions and 46 deletions

View file

@ -3,6 +3,7 @@ package types
import (
"errors"
"fmt"
"github.com/docker/libkv/store"
"github.com/ryanuber/go-glob"
"strings"
)
@ -192,6 +193,18 @@ func (cs *Constraints) Type() string {
return fmt.Sprint("constraint")
}
// Store holds KV store cluster config
type Store struct {
store.Store
Prefix string // like this "prefix" (without the /)
}
// Cluster holds cluster config
type Cluster struct {
Node string
Store Store
}
// Auth holds authentication configuration (BASIC, DIGEST, users)
type Auth struct {
Basic *Basic