【代码优化】IoT: 数据桥梁

This commit is contained in:
puhui999
2025-03-25 16:33:18 +08:00
parent 416c7f42ab
commit d6da0cbc46
9 changed files with 39 additions and 31 deletions

View File

@@ -80,17 +80,21 @@ export interface RedisStreamMQConfig extends Config {
}
/** 数据桥梁类型 */
// TODO @puhui999枚举用 number 可以么?
export const IoTDataBridgeConfigType = {
HTTP: '1',
TCP: '2',
WEBSOCKET: '3',
MQTT: '10',
DATABASE: '20',
REDIS_STREAM: '21',
ROCKETMQ: '30',
RABBITMQ: '31',
KAFKA: '32'
HTTP: 1,
TCP: 2,
WEBSOCKET: 3,
MQTT: 10,
DATABASE: 20,
REDIS_STREAM: 21,
ROCKETMQ: 30,
RABBITMQ: 31,
KAFKA: 32
} as const
export const IotDataBridgeDirectionEnum = {
INPUT: 1, // 输入
OUTPUT: 2 // 输出
} as const
// 数据桥梁 API