diff --git a/dc3-center/dc3-center-ekuiper/Dockerfile b/dc3-center/dc3-center-ekuiper/Dockerfile
deleted file mode 100644
index 040a5a456..000000000
--- a/dc3-center/dc3-center-ekuiper/Dockerfile
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright 2016-present the IoT DC3 original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# runtime
-FROM registry.cn-beijing.aliyuncs.com/dc3/dc3-jre:17 AS runtime
-LABEL dc3.author pnokers
-LABEL dc3.author.email pnokers.icloud.com
-
-# default env
-ENV PARAMS ''
-ENV NODE_ENV dev
-ENV SERVER_PORT 8600
-ENV GRPC_PORT 9600
-
-
-# default jvm & gc env
-ENV JAVA_OPS -server \
- -Xms256m \
- -Xmx1024m \
- -Djava.security.egd=file:/dev/./urandom \
- -XX:+UseG1GC
-ENV GC_LOG -Xlog:gc*:file=dc3/logs/center/ekuiper/gc/gc.log:time,uptime,level,tags:filecount=20,filesize=10M
-
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-
-WORKDIR /dc3-center/dc3-center-ekuiper
-
-ADD ./target/dc3-center-ekuiper.jar ./
-
-EXPOSE ${SERVER_PORT}
-EXPOSE ${GRPC_PORT}
-VOLUME /dc3-center/dc3-center-ekuiper/dc3/logs
-
-CMD mkdir -p /dc3-center/dc3-center-ekuiper/dc3/logs/center/ekuiper/gc \
- && java ${JAVA_OPS} ${GC_LOG} -jar dc3-center-ekuiper.jar ${PARAMS}
diff --git a/dc3-center/dc3-center-ekuiper/pom.xml b/dc3-center/dc3-center-ekuiper/pom.xml
deleted file mode 100644
index 7a90cea3d..000000000
--- a/dc3-center/dc3-center-ekuiper/pom.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
- 4.0.0
-
- io.github.pnoker
- dc3-center
- 2024.3.0
-
-
- dc3-center-ekuiper
- jar
-
- IOT DC3 平台 规则引擎服务
-
-
- UTF-8
-
-
-
-
-
- io.github.pnoker
- dc3-common-mysql
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-webflux
-
-
-
-
- com.alibaba
- fastjson
- 1.2.54
-
-
-
- org.glassfish
- javax.el
- 3.0.1-b11
-
-
-
-
- cn.hutool
- hutool-all
- 5.8.3
-
-
-
- io.github.pnoker
- dc3-common-repository
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
-
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/EkuiperApplication.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/EkuiperApplication.java
deleted file mode 100644
index 8381f32e1..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/EkuiperApplication.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * @author : Zhen
- */
-@SpringBootApplication
-public class EkuiperApplication {
- private static final Logger log = LoggerFactory.getLogger(EkuiperApplication.class);
-
- public static void main(String[] args) {
- SpringApplication.run(EkuiperApplication.class, args);
- log.info("Ekuiper Application Start...");
- }
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/config/EkuiperConfig.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/config/EkuiperConfig.java
deleted file mode 100644
index 21e71627f..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/config/EkuiperConfig.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.config;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import io.github.ponker.center.ekuiper.entity.dto.SqlConfigDto;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.reactive.function.client.WebClient;
-
-/**
- * @author : Zhen
- */
-@Configuration
-public class EkuiperConfig {
-
- @Bean
- public WebClient webClient() {
- return WebClient.create();
- }
-
- @Bean
- public ObjectMapper objectMapper() {
- return new ObjectMapper();
- }
-
- @Bean
- public SqlConfigDto sqlConfigDto() {
- return new SqlConfigDto();
- }
-
-
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CacheConstant.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CacheConstant.java
deleted file mode 100644
index 290924814..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CacheConstant.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.constant;
-
-/**
- * 缓存相关
- *
- * @author pnoker
- */
-public interface CacheConstant {
- /**
- * 超时相关
- */
- interface Timeout {
- /**
- * salt 在 redis 中的失效时间, 分钟
- */
- int SALT_CACHE_TIMEOUT = 5;
- /**
- * user 登陆限制失效时间, 分钟
- */
- int USER_LIMIT_TIMEOUT = 5;
- /**
- * token 在 redis 中的失效时间, 小时
- */
- int TOKEN_CACHE_TIMEOUT = 12;
- }
-
- /**
- * 实体相关
- */
- interface Entity {
- String TENANT = "tenant";
- String TENANT_BIND = "tenant_bind";
- String BLACK_IP = "black_ip";
- String RTMP = "rtmp";
- String USER = "user";
- String DRIVER = "driver";
- String DRIVER_INFO = "driver_info";
- String DRIVER_ATTRIBUTE = "driver_attribute";
- String PROFILE = "profile";
- String PROFILE_BIND = "profile_bind";
- String GROUP = "group";
- String DEVICE = "device";
- String POINT = "point";
- String POINT_ATTRIBUTE = "point_attribute";
- String POINT_INFO = "point_info";
- String LABEL = "label";
- String LABEL_BIND = "label_bind";
- }
-
- /**
- * 前缀相关
- */
- interface Prefix {
- String REAL_TIME_VALUE_KEY_PREFIX = Entity.POINT + Suffix.VALUE + CommonConstant.Symbol.SEPARATOR;
- String DRIVER_STATUS_KEY_PREFIX = Entity.DRIVER + Suffix.STATUS + CommonConstant.Symbol.SEPARATOR;
- String DEVICE_STATUS_KEY_PREFIX = Entity.DEVICE + Suffix.STATUS + CommonConstant.Symbol.SEPARATOR;
- }
-
- /**
- * 后缀相关
- */
- interface Suffix {
- String ID = "_id";
- String TENANT_ID = "_tenant_id";
- String USER_ID = "_user_id";
- String DRIVER_ID = "_driver_id";
- String GROUP_ID = "_group_id";
- String PROFILE_ID = "_profile_id";
- String POINT_ID = "_point_id";
- String DEVICE_ID = "_device_id";
- String ATTRIBUTE_ID = "_attribute_id";
- String ENTITY_ID = "_entity_id";
-
- String NAME = "_name";
- String PHONE = "_phone";
- String EMAIL = "_email";
- String SALT = "_salt";
- String TOKEN = "_token";
- String LIMIT = "_limit";
- String VALUE = "_value";
- String STATUS = "_status";
- String TYPE = "_type";
- String UNIT = "_unit";
- String IP = "_ip";
- String HOST_PORT = "_host_port";
- String SERVICE_NAME = "_service_name";
-
- String LIST = "_list";
- String DIC = "_dic";
- }
-
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CommonConstant.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CommonConstant.java
deleted file mode 100644
index 315d6c197..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/CommonConstant.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.constant;
-
-
-/**
- * dc3平台常量
- *
- * @author pnoker
- */
-public interface CommonConstant {
-
- /**
- * 符号相关
- */
- interface Symbol {
- /**
- * 点
- */
- String DOT = ".";
-
- /**
- * 下划线
- */
- String UNDERSCORE = "_";
-
- /**
- * 星号
- */
- String ASTERISK = "*";
-
- /**
- * 井号
- */
- String HASHTAG = "#";
-
- /**
- * 分隔符
- */
- String SEPARATOR = "::";
-
- /**
- * 斜线
- */
- String SLASH = "/";
- }
-
- /**
- * 算法相关
- */
- interface Algorithm {
- /**
- * 默认密钥
- */
- String DEFAULT_KEY = "io.github.pnoker.dc3";
-
- /**
- * 默认密码
- */
- String DEFAULT_PASSWORD = "a12345";
-
- /**
- * 加密算法 对称AES
- */
- String ALGORITHM_AES = "AES";
-
- /**
- * 加密算法 非对称RSA
- */
- String ALGORITHM_RSA = "RSA";
-
- /**
- * 加密算法 SHA256withRSA
- */
- String ALGORITHM_SHA256_RSA = "SHA256withRSA";
-
- /**
- * 证书类型 X.509
- */
- String CERTIFICATE_X509 = "X.509";
-
- /**
- * 证书类型 PKCS12
- */
- String CERTIFICATE_PKCS12 = "PKCS12";
-
- /**
- * 证书类型 JKS
- */
- String CERTIFICATE_JKS = "jks";
- }
-
- /**
- * 时间相关
- */
- interface Time {
- /**
- * 时区
- */
- String TIMEZONE = "GMT+8";
-
- /**
- * 时间格式化
- */
- String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
- String COMPLETE_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
- }
-
- /**
- * 文件夹相关
- */
- interface Folder {
- /**
- * 用户主目录
- */
- String USER_HOME_PATH = System.getProperty("user.home") + "/.dc3/";
-
- /**
- * 默认上传文件的缓存位置
- */
- String TEMP_FILE_PATH = System.getProperty("java.io.tmpdir") + "/dc3/";
- }
-
- /**
- * 响应相关
- */
- interface Response {
- String OK = "ok";
- String ERROR = "error";
- }
-
- /**
- * 消息相关
- */
- interface Rabbit {
- // Arguments
- String MESSAGE_TTL = "x-message-ttl";
-
- String TOPIC_EXCHANGE_EVENT = "dc3.exchange.event";
- String ROUTING_DRIVER_EVENT_PREFIX = "dc3.routing.event.driver.";
- String QUEUE_DRIVER_EVENT = "dc3.queue.event.driver";
- // Event
- String ROUTING_DEVICE_EVENT_PREFIX = "dc3.routing.event.device.";
- String QUEUE_DEVICE_EVENT = "dc3.queue.event.device";
-
- // Metadata
- String TOPIC_EXCHANGE_METADATA = "dc3.exchange.metadata";
- String ROUTING_DRIVER_METADATA_PREFIX = "dc3.routing.metadata.driver.";
- String QUEUE_DRIVER_METADATA_PREFIX = "dc3.queue.metadata.driver.";
-
- // Value
- String TOPIC_EXCHANGE_VALUE = "dc3.exchange.value";
- String ROUTING_POINT_VALUE_PREFIX = "dc3.routing.value.point.";
- String QUEUE_POINT_VALUE = "dc3.queue.value.point";
- }
-
- /**
- * 存储相关
- */
- interface Storage {
- /**
- * 设备数据存储集合前缀
- */
- String POINT_VALUE_PREFIX = CacheConstant.Entity.POINT + io.github.ponker.center.ekuiper.constant.CacheConstant.Suffix.VALUE + Symbol.UNDERSCORE;
- }
-
- /**
- * 状态相关
- */
- interface Status {
- /**
- * 注册状态相关
- */
- String REGISTERING = "REGISTERING";
- String UNREGISTERED = "UNREGISTERED";
-
- /**
- * 运行状态相关
- */
- String ONLINE = "ONLINE";
- String OFFLINE = "OFFLINE";
- String MAINTAIN = "MAINTAIN";
- String FAULT = "FAULT";
- }
-
- /**
- * 驱动相关
- */
- interface Driver {
- int DEFAULT_MAX_REQUEST_SIZE = 100;
-
- /**
- * 事件相关
- */
- interface Event {
- /**
- * 驱动注册握手事件, 该事件用于校验当前 dc3-center-manager 是否可用
- */
- String DRIVER_HANDSHAKE = "driver_handshake";
- String DRIVER_HANDSHAKE_BACK = "driver_handshake_back";
-
- /**
- * 驱动注册事件, 该事件用于向 dc3-center-manager 注册驱动配置信息
- */
- String DRIVER_REGISTER = "driver_register";
- String DRIVER_REGISTER_BACK = "driver_register_back";
-
- /**
- * 同步驱动元数据时间, 该事件用于向 dc3-center-manager 发送驱动元数据同步请求
- */
- String DRIVER_METADATA_SYNC = "driver_metadata_sync";
- String DRIVER_METADATA_SYNC_BACK = "driver_metadata_sync_back";
-
- /**
- * 驱动心跳事件, 该事件用于向 dc3-center-manager 发送驱动的当前状态
- */
- String DRIVER_HEARTBEAT = "driver_heartbeat";
-
- String ERROR = "error";
- }
-
- /**
- * 类型
- */
- interface Type {
- String DRIVER = "driver";
- String GATEWAY = "gateway";
- String PROFILE = "profile";
- String DEVICE = "device";
- String POINT = "point";
- String DRIVER_INFO = "driver_info";
- String POINT_INFO = "point_info";
- }
-
- interface Profile {
- String ADD = "add_profile";
- String DELETE = "delete_profile";
- String UPDATE = "update_profile";
- }
-
- interface Device {
- String ADD = "add_device";
- String DELETE = "delete_device";
- String UPDATE = "update_device";
- }
-
- interface Point {
- String ADD = "add_point";
- String DELETE = "delete_point";
- String UPDATE = "update_point";
- }
-
- interface DriverConfig {
- String ADD = "add_driver_info";
- String DELETE = "delete_driver_info";
- String UPDATE = "update_driver_info";
- }
-
- interface PointConfig {
- String ADD = "add_point_info";
- String DELETE = "delete_point_info";
- String UPDATE = "update_point_info";
- }
- }
-
- /**
- * 设备相关
- */
- interface Device {
-
- /**
- * 设备事件
- */
- interface Event {
- /**
- * 设备心跳事件
- */
- String HEARTBEAT = "heartbeat";
-
- /**
- * 超出上限事件
- */
- String OVER_UPPER_LIMIT = "over_upper_limit";
-
- /**
- * 超出下限事件
- */
- String OVER_LOWER_LIMIT = "over_lower_limit";
-
- /**
- * 用于记录错误事件类型
- */
- String ERROR = "error";
- }
- }
-
- /**
- * 策略工厂相关
- */
- interface RepositoryStrategy {
- String REPOSITORY_STRATEGY = "repository" + Symbol.SEPARATOR;
-
- String REPOSITORY_STRATEGY_REDIS = "redis";
- String REPOSITORY_STRATEGY_MONGO = "mongo";
- String REPOSITORY_STRATEGY_INFLUXDB = "influxdb";
- String REPOSITORY_STRATEGY_OPENTSDB = "opentsdb";
- String REPOSITORY_STRATEGY_ELASTICSEARCH = "elasticsearch";
- String REPOSITORY_STRATEGY_MQTT = "mqtt";
- }
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/EkuiperConstant.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/EkuiperConstant.java
deleted file mode 100644
index 3e709a26d..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/EkuiperConstant.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.constant;
-
-/**
- * @author : Zhen
- *
- * 规则引擎相关
- */
-public interface EkuiperConstant {
-
- /**
- * 规则引擎url相关
- */
- interface EKUIPERURL {
-
- String STREAM_URL = "http://localhost:9081/streams";
- String TABLE_URL = "http://localhost:9081/tables";
- String CONFKEY_URL = "http://localhost:9081/metadata/sources";
- String RULE_URL = "http://localhost:9081/rules";
- }
-
-
- interface ConKeyType {
-
- String MQTT = "mqtt";
- String REDIS = "redis";
- String HTTPPULL = "httppull";
- String HTTPPUSH = "httppush";
- String SQL = "sql";
- String REST = "rest";
- }
-
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/ServiceConstant.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/ServiceConstant.java
deleted file mode 100644
index f50b9400f..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/constant/ServiceConstant.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.constant;
-
-/**
- * 服务相关
- *
- * @author pnoker
- */
-public interface ServiceConstant {
-
- /**
- * 规则引擎服务相关
- */
- interface Ekuiper {
- String SERVICE_NAME = "DC3-CENTER-EKUIPER";
- String STREAM_URL_PREFIX = "/stream";
- String TABLE_URL_PREFIX = "/table";
- String RULE_URL_PREFIX = "/rule";
- String CONFKEY_URL_PREFIX = "/confkey";
- String SINKTEM_URL_PREFIX = "/sinktem";
- }
-
-}
diff --git a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/controller/ConKeyController.java b/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/controller/ConKeyController.java
deleted file mode 100644
index 7c2cb23c2..000000000
--- a/dc3-center/dc3-center-ekuiper/src/main/java/io/github/ponker/center/ekuiper/controller/ConKeyController.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright 2016-present the IoT DC3 original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.github.ponker.center.ekuiper.controller;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import io.github.ponker.center.ekuiper.constant.ServiceConstant;
-import io.github.ponker.center.ekuiper.entity.R;
-import io.github.ponker.center.ekuiper.service.ApiService;
-import io.github.ponker.center.ekuiper.service.ConfigService;
-import io.github.ponker.center.ekuiper.service.SinkTemplateService;
-import io.github.ponker.center.ekuiper.service.UrlService;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpMethod;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import reactor.core.publisher.Mono;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author : Zhen
- */
-
-@Slf4j
-@RestController
-@RequestMapping(ServiceConstant.Ekuiper.CONFKEY_URL_PREFIX)
-public class ConKeyController {
-
- @Resource
- private ApiService apiService;
-
- @Resource
- private ConfigService configService;
-
- @Resource
- private ObjectMapper objectMapper;
-
- @Resource
- private UrlService urlService;
-
- @Resource
- private SinkTemplateService sinkTemplateService;
-
- /**
- * 注册, 更新ConfKey
- */
- @PutMapping("/create")
- public Mono> createConf(@Validated @RequestBody Object form, @RequestParam(name = "name") String name, @RequestParam(name = "confKey") String confKey) {
- String url = urlService.getConfigUrl() + "/sources/" + name + "/confKeys/" + confKey;
- Mono stringMono = configService.callApiConfig(HttpMethod.PUT, url, form, name);
- return stringMono.flatMap(s -> {
- try {
- return Mono.just(R.ok(s));
- } catch (Exception e) {
- log.error("Failed to call create ConfKey API", e);
- return Mono.just(R.fail(e.getMessage()));
- }
- });
- }
-
- /**
- * 列出{name}类型的全部Confkey
- */
- @GetMapping("/list")
- public Mono>>> listConf(@RequestParam(name = "name") String name) {
- String url = urlService.getConfigUrl() + "/sources/yaml/" + name;
- Mono stringMono = apiService.callApi(HttpMethod.GET, url);
- return stringMono.flatMap(jsonString -> {
- try {
- TypeReference