Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 1.35 KB

connection.md

File metadata and controls

89 lines (65 loc) · 1.35 KB

连接管理

连通性检查

通过 API 检查 eKuiper 连接的连通性

sink 端连接检查

POST http://localhost:9081/metadata/sinks/connection/{sink}
{
  "configuration": "xxxx"
}

sink 端连接检查会根据传入的 sinkType 和配置来检查连接的连通性,以 mysql Sink 为例:

POST http://localhost:9081/metadata/sinks/connection/sql
{
  "url": "mysql://[email protected]:4000/test",
  "table": "test",
  "fields": ["a","b","c"]
}

source 端连接检查

POST http://localhost:9081/metadata/sources/connection/{source}
{
  "configuration": "xxxx"
}

source 端连接检查会根据传入的 sourceType 和配置来检查连接的连通性,以 mysql Source 为例:

POST http://localhost:9081/metadata/sources/connection/sql
{
  "url": "mysql://[email protected]:4000/test",
}

websocket 连接管理

通过 API 管理 eKuiper websocket 的连接

创建 websocket endpoint

POST http://localhost:9081/connection/websocket

请求示例:

{
  "endpoint": "/xxxx"
}

删除 websocket endpoint

DELETE http://localhost:9081/connection/websocket

请求示例:

{
  "endpoint": "/xxxx"
}

查看 websocket endpoint

GET http://localhost:9081/connection/websocket

请求示例:

{
  "endpoint": "/xxxx"
}