private Watch.Listener watch(final BiConsumer<String, String> updateHandler,
                                 final Consumer<String> deleteHandler) {
        return Watch.listener(response -> {
            for (WatchEvent event : response.getEvents()) {
                String path = event.getKeyValue().getKey().toString(UTF_8);
                String value = event.getKeyValue().getValue().toString(UTF_8);
                switch (event.getEventType()) {
                    case PUT:
                        Optional.ofNullable(updateHandler).ifPresent(handler -> handler.accept(path, value));
                        continue;
                    case DELETE:
                        Optional.ofNullable(deleteHandler).ifPresent(handler -> handler.accept(path));
                        continue;
                    default:
                }
            }
        }, throwable -> {
                LOG.error("etcd watch error {}", throwable.getMessage(), throwable);
                throw new ShenyuException(throwable);
            });
    }
subscribe sub node change.

@param key           param node name.
@param updateHandler sub node handler of update
@param deleteHandler sub node delete of delete
shenyu-sync-data-center/shenyu-sync-data-etcd/src/main/java/org/apache/shenyu/sync/data/etcd/EtcdClient.java