traefik/pkg/provider/kv/etcd/etcd.go
Romain f90e3817e8
Support multiple namespaces for Consul and ConsulCatalog providers
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
2022-06-03 12:00:09 +02:00

25 lines
562 B
Go

package etcd
import (
"github.com/kvtools/valkeyrie/store"
"github.com/traefik/traefik/v2/pkg/provider"
"github.com/traefik/traefik/v2/pkg/provider/kv"
)
var _ provider.Provider = (*Provider)(nil)
// Provider holds configurations of the provider.
type Provider struct {
kv.Provider `export:"true"`
}
// SetDefaults sets the default values.
func (p *Provider) SetDefaults() {
p.Provider.SetDefaults()
p.Endpoints = []string{"127.0.0.1:2379"}
}
// Init the provider.
func (p *Provider) Init() error {
return p.Provider.Init(store.ETCDV3, "etcd", "")
}