traefik/pkg/provider/kv/consul/consul.go
Ludovic Fernandez 9b9f4be6a4 Add KV store providers (dynamic configuration only)
Co-authored-by: Jean-Baptiste Doumenjou <jb.doumenjou@gmail.com>
2019-11-28 21:56:04 +01:00

25 lines
551 B
Go

package consul
import (
"github.com/abronan/valkeyrie/store"
"github.com/containous/traefik/v2/pkg/provider"
"github.com/containous/traefik/v2/pkg/provider/kv"
)
var _ provider.Provider = (*Provider)(nil)
// Provider holds configurations of the provider.
type Provider struct {
kv.Provider
}
// SetDefaults sets the default values.
func (p *Provider) SetDefaults() {
p.Provider.SetDefaults()
p.Endpoints = []string{"127.0.0.1:8500"}
}
// Init the provider
func (p *Provider) Init() error {
return p.Provider.Init(store.CONSUL, "consul")
}