-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extension impl structure (#2995)
Signed-off-by: Jiyong Huang <[email protected]>
- Loading branch information
Showing
31 changed files
with
677 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,11 +41,11 @@ jobs: | |
mkdir -p plugins/sinks plugins/sources plugins/functions | ||
sed -i -r "s/debug: .*/debug: true/1" etc/kuiper.yaml | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/sources/[email protected] extension/random/ext/export.go | ||
cp extension/random/random.yaml etc/sources/random.yaml | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/Echo.so extension/function/echo/echo.go | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extension/function/countPlusOne/countPlusOne.go | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extension/function/accumulateWordCount/accumulateWordCount.go | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/sources/[email protected] extensions/sources/random/random.go | ||
cp extensions/sources/random/random.yaml etc/sources/random.yaml | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/Echo.so extensions/functions/echo/echo.go | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extensions/functions/countPlusOne/countPlusOne.go | ||
go build --buildmode=plugin -trimpath --cover -covermode=atomic -coverpkg=./... -o plugins/functions/[email protected] extensions/functions/accumulateWordCount/accumulateWordCount.go | ||
mkdir -p plugins/portable/mirror | ||
cd sdk/go/example/mirror | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2022-2024 EMQ Technologies Co., Ltd. | ||
// | ||
// 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 | ||
// | ||
// http://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 main | ||
|
||
import ( | ||
"github.com/lf-edge/ekuiper/contract/v2/api" | ||
"github.com/lf-edge/ekuiper/v2/extensions/impl/sql" | ||
) | ||
|
||
func Sql() api.Sink { | ||
return sql.GetSink() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"about": { | ||
"trial": true, | ||
"author": { | ||
"name": "EMQ", | ||
"email": "[email protected]", | ||
"company": "EMQ Technologies Co., Ltd", | ||
"website": "https://www.emqx.io" | ||
}, | ||
"helpUrl": { | ||
"en_US": "https://ekuiper.org/docs/en/latest/guide/sinks/plugin/sql.html", | ||
"zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sinks/plugin/sql.html" | ||
}, | ||
"description": { | ||
"en_US": "This a sink plugin for Sql based Database, it can be used for saving the analysis data into Sql based database.", | ||
"zh_CN": "本插件为 SQL Database 的持久化插件,可以用于将分析数据存入支持 SQL 语法的数据库中" | ||
} | ||
}, | ||
"libs": [ | ||
], | ||
"properties": [ | ||
{ | ||
"name": "url", | ||
"default": "", | ||
"optional": false, | ||
"control": "text", | ||
"type": "string", | ||
"hint": { | ||
"en_US": "The url of the database, it is important to note that the password in the URL is url-encoded characters, and you need to re-enter the password when editing. For example, the database address of mysql is mysql://username:[email protected]:3306/testdb?parseTime=true, if the original password is 123:#?, the password here should be filled in with 123%3A%23%3F", | ||
"zh_CN": "数据库服务器的 URL,需要特别注意的是 URL 中的密码为 url 编码后的字符,并且编辑时需要重新输入密码。例如,mysql 的数据库地址为 mysql://username:[email protected]:3306/testdb?parseTime=true,若原始密码为 123:#?,则这里的 password 应填入 123%3A%23%3F" | ||
}, | ||
"label": { | ||
"en_US": "server address", | ||
"zh_CN": "数据库地址" | ||
} | ||
}, | ||
{ | ||
"name": "table", | ||
"default": "", | ||
"optional": false, | ||
"control": "text", | ||
"type": "string", | ||
"hint": { | ||
"en_US": "Table name", | ||
"zh_CN": "表名" | ||
}, | ||
"label": { | ||
"en_US": "Table name", | ||
"zh_CN": "表名" | ||
} | ||
}, | ||
{ | ||
"name": "fields", | ||
"default": [], | ||
"optional": true, | ||
"control": "list", | ||
"type": "list_string", | ||
"hint": { | ||
"en_US": "Tag fields written to the database", | ||
"zh_CN": "写入数据库的标签字段" | ||
}, | ||
"label": { | ||
"en_US": "Tag Fields", | ||
"zh_CN": "标签字段" | ||
} | ||
} | ||
], | ||
"node": { | ||
"category": "sink", | ||
"icon": "iconPath", | ||
"label": { | ||
"en": "SQL", | ||
"zh": "SQL" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2022-2024 EMQ Technologies Co., Ltd. | ||
// | ||
// 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 | ||
// | ||
// http://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 main | ||
|
||
import ( | ||
"github.com/lf-edge/ekuiper/contract/v2/api" | ||
"github.com/lf-edge/ekuiper/v2/extensions/impl/sql" | ||
) | ||
|
||
func Sql() api.Source { | ||
return sql.GetSource() | ||
} |
Oops, something went wrong.