2019-11-28 20:56:04 +00:00
|
|
|
package zk
|
|
|
|
|
|
|
|
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:2181"}
|
|
|
|
}
|
|
|
|
|
2020-05-11 10:06:07 +00:00
|
|
|
// Init the provider.
|
2019-11-28 20:56:04 +00:00
|
|
|
func (p *Provider) Init() error {
|
|
|
|
return p.Provider.Init(store.ZK, "zookeeper")
|
|
|
|
}
|