2015-11-01 16:35:01 +01:00
|
|
|
package provider
|
|
|
|
|
|
|
|
import "github.com/emilevauge/traefik/types"
|
2015-10-01 12:04:25 +02:00
|
|
|
|
2015-11-01 19:29:47 +01:00
|
|
|
// Etcd holds configurations of the Etcd provider.
|
2015-11-02 19:48:34 +01:00
|
|
|
type Etcd struct {
|
2015-10-01 12:04:25 +02:00
|
|
|
Watch bool
|
|
|
|
Endpoint string
|
|
|
|
Prefix string
|
|
|
|
Filename string
|
2015-11-02 19:48:34 +01:00
|
|
|
KvProvider *Kv
|
2015-10-01 12:04:25 +02:00
|
|
|
}
|
|
|
|
|
2015-11-01 19:29:47 +01:00
|
|
|
// Provide allows the provider to provide configurations to traefik
|
|
|
|
// using the given configuration channel.
|
2015-11-02 19:48:34 +01:00
|
|
|
func (provider *Etcd) Provide(configurationChan chan<- types.ConfigMessage) error {
|
2015-10-01 12:04:25 +02:00
|
|
|
provider.KvProvider = NewEtcdProvider(provider)
|
|
|
|
return provider.KvProvider.provide(configurationChan)
|
|
|
|
}
|