You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
446 B

package go_etcd
import (
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf"
"git.gz.internal.jumaiyx.cn/pkg/go-etcd/discver"
"github.com/go-kratos/kratos/v2/log"
)
const (
EtcdHost = "etcd.host"
EtcdPass = "etcd.password"
EtcdTimeout = "etcd.timeout"
)
func NewEtcd(bc *conf.Etcd) (*discver.Registry, error) {
registry, err := discver.NewRegistry(bc)
if err != nil {
log.Errorf("etcd dial failed:%v", err)
}
return registry, err
}