@Override
    public void close() {
        try {
            watchCache.values().forEach(Watch.Watcher::close);
            watchCache.clear();
            if (Objects.nonNull(client)) {
                client.close();
            }
            LOGGER.info("Shutting down EtcdDiscoveryService");
        } catch (Exception e) {
            LOGGER.error("etcd client shutdown error", e);
            throw new ShenyuException(e);
        }
    }
The type Etcd instance register repository.
shenyu-registry/shenyu-registry-etcd/src/main/java/org/apache/shenyu/registry/etcd/EtcdInstanceRegisterRepository.java