1
0
Fork 0

Use KvStores as global config source

This commit is contained in:
Martin 2016-06-24 09:58:42 +02:00
parent 9be0c67d5c
commit 056e0fe2d9
15 changed files with 330 additions and 26 deletions

View file

@ -9,7 +9,7 @@ import (
// BoltDb holds configurations of the BoltDb provider.
type BoltDb struct {
Kv
Kv `mapstructure:",squash"`
}
// Provide allows the provider to provide configurations to traefik

View file

@ -9,7 +9,7 @@ import (
// Consul holds configurations of the Consul provider.
type Consul struct {
Kv
Kv `mapstructure:",squash"`
}
// Provide allows the provider to provide configurations to traefik

View file

@ -25,11 +25,11 @@ const (
// ConsulCatalog holds configurations of the Consul catalog provider.
type ConsulCatalog struct {
BaseProvider
Endpoint string `description:"Consul server endpoint"`
Domain string `description:"Default domain used"`
client *api.Client
Prefix string
BaseProvider `mapstructure:",squash"`
Endpoint string `description:"Consul server endpoint"`
Domain string `description:"Default domain used"`
client *api.Client
Prefix string
}
type serviceUpdate struct {

View file

@ -29,7 +29,7 @@ const DockerAPIVersion string = "1.21"
// Docker holds configurations of the Docker provider.
type Docker struct {
BaseProvider
BaseProvider `mapstructure:",squash"`
Endpoint string `description:"Docker server endpoint. Can be a tcp or a unix socket endpoint"`
Domain string `description:"Default domain used"`
TLS *DockerTLS `description:"Enable Docker TLS support"`

View file

@ -9,7 +9,7 @@ import (
// Etcd holds configurations of the Etcd provider.
type Etcd struct {
Kv
Kv `mapstructure:",squash"`
}
// Provide allows the provider to provide configurations to traefik

View file

@ -14,7 +14,7 @@ import (
// File holds configurations of the File provider.
type File struct {
BaseProvider
BaseProvider `mapstructure:",squash"`
}
// Provide allows the provider to provide configurations to traefik

View file

@ -51,7 +51,7 @@ func (ns *Namespaces) SetValue(val interface{}) {
// Kubernetes holds configurations of the Kubernetes provider.
type Kubernetes struct {
BaseProvider
BaseProvider `mapstructure:",squash"`
Endpoint string `description:"Kubernetes server endpoint"`
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers"`
Namespaces Namespaces `description:"Kubernetes namespaces"`

View file

@ -22,12 +22,12 @@ import (
// Kv holds common configurations of key-value providers.
type Kv struct {
BaseProvider
Endpoint string `description:"Comma sepparated server endpoints"`
Prefix string `description:"Prefix used for KV store"`
TLS *KvTLS `description:"Enable TLS support"`
storeType store.Backend
kvclient store.Store
BaseProvider `mapstructure:",squash"`
Endpoint string `description:"Comma sepparated server endpoints"`
Prefix string `description:"Prefix used for KV store"`
TLS *KvTLS `description:"Enable TLS support"`
storeType store.Backend
kvclient store.Store
}
// KvTLS holds TLS specific configurations

View file

@ -9,7 +9,7 @@ import (
// Zookepper holds configurations of the Zookepper provider.
type Zookepper struct {
Kv
Kv `mapstructure:",squash"`
}
// Provide allows the provider to provide configurations to traefik