func (r *etcdV3Registry) CloseListener() {
	if r.configListener != nil {
		r.configListener.Close()
	}
}
CloseListener closes listeners
package etcdv3
import (
	"fmt"
	"path"
	"strings"
	"sync"
)
import (
	gxetcd "github.com/dubbogo/gost/database/kv/etcd/v3"
	perrors "github.com/pkg/errors"
)
import (
	"dubbo.apache.org/dubbo-go/v3/common"
	"dubbo.apache.org/dubbo-go/v3/common/constant"
	"dubbo.apache.org/dubbo-go/v3/common/extension"
	"dubbo.apache.org/dubbo-go/v3/common/logger"
	"dubbo.apache.org/dubbo-go/v3/registry"
	"dubbo.apache.org/dubbo-go/v3/remoting/etcdv3"
)
const (
	Name = "etcdv3"
)
func init() {
	extension.SetRegistry(Name, newETCDV3Registry)
}
type etcdV3Registry struct {
	registry.BaseRegistry
	cltLock        sync.Mutex
	client         *gxetcd.Client
	listenerLock   sync.RWMutex
	listener       *etcdv3.EventListener
	dataListener   *dataListener
	configListener *configurationListener
}
func (r *etcdV3Registry) Client() *gxetcd.Client {
	return r.client
}
func (r *etcdV3Registry) SetClient(client *gxetcd.Client) {
	r.client = client
}
func (r *etcdV3Registry) ClientLock() *sync.Mutex {
	return &r.cltLock
}
func newETCDV3Registry(url *common.URL) (registry.Registry, error) {
	timeout := url.GetParamDuration(constant.CONFIG_TIMEOUT_KEY, constant.DEFAULT_REG_TIMEOUT)
	logger.Infof("etcd address is: %v, timeout is: %s", url.Location, timeout.String())
	r := &etcdV3Registry{}
	r.InitBaseRegistry(url, r)
	if err := etcdv3.ValidateClient(
		r,
		gxetcd.WithName(gxetcd.RegistryETCDV3Client),
		gxetcd.WithTimeout(timeout),
		gxetcd.WithEndpoints(strings.Split(url.Location, ",")...),
	); err != nil {
		return nil, err
	}
	r.handleClientRestart()
	r.InitListeners()
	return r, nil
}
func (r *etcdV3Registry) InitListeners() {
	r.listener = etcdv3.NewEventListener(r.client)
	r.configListener = NewConfigurationListener(r)
	r.dataListener = NewRegistryDataListener(r.configListener)
}
func (r *etcdV3Registry) DoRegister(root string, node string) error {
	return r.client.RegisterTemp(path.Join(root, node), "")
}
func (r *etcdV3Registry) DoUnregister(root string, node string) error {
	return perrors.New("DoUnregister is not support in etcdV3Registry")
}
func (r *etcdV3Registry) CloseAndNilClient() {
	r.client.Close()
	r.client = nil
}