Add KV datastore
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
38b62d4ae3
commit
5a0440d6f8
21 changed files with 498 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue