Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Eolink
goku-api-gateway
提交
f63a55b4
G
goku-api-gateway
项目概览
Eolink
/
goku-api-gateway
上一次同步 1 年多
通知
133
Star
2992
Fork
611
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
goku-api-gateway
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f63a55b4
编写于
1月 18, 2020
作者:
Y
Your Name
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改编译脚本
上级
cd8e4a1b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
254 addition
and
253 deletion
+254
-253
build/cmd/build-console.sh
build/cmd/build-console.sh
+1
-1
build/console/.gitignore
build/console/.gitignore
+1
-0
build/console/resources/sql/goku_ce.sql
build/console/resources/sql/goku_ce.sql
+237
-236
build/node/resources/run.sh
build/node/resources/run.sh
+15
-16
未找到文件。
build/cmd/build-console.sh
浏览文件 @
f63a55b4
...
...
@@ -12,7 +12,7 @@ OUTPATH="${BasePath}/out/console-${VERSION}"
buildApp console
$VERSION
mkdir
${
OUTPATH
}
/static
cp
-a
${
BasePath
}
/app/console/static/
*
${
OUTPATH
}
/static/
cp
-a
${
BasePath
}
/build/console/resources/
*
${
OUTPATH
}
/
chmod
+x
${
OUTPATH
}
/install.sh
${
OUTPATH
}
/run.sh
...
...
build/console/.gitignore
0 → 100644
浏览文件 @
f63a55b4
/static/
build/console/resources/sql/goku_ce.sql
浏览文件 @
f63a55b4
...
...
@@ -5,13 +5,13 @@ PRAGMA foreign_keys = false;
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_admin"
;
CREATE
TABLE
"goku_admin"
(
"userID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"loginCall"
text
(
255
)
NOT
NULL
,
"loginPassword"
text
(
255
)
NOT
NULL
,
"userType"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"remark"
text
(
255
),
"permissions"
text
"userID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"loginCall"
text
(
255
)
NOT
NULL
,
"loginPassword"
text
(
255
)
NOT
NULL
,
"userType"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"remark"
text
(
255
),
"permissions"
text
);
-- ----------------------------
...
...
@@ -19,18 +19,18 @@ CREATE TABLE "goku_admin" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_balance"
;
CREATE
TABLE
"goku_balance"
(
"balanceID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"balanceName"
text
(
255
)
NOT
NULL
,
"serviceName"
text
(
255
)
NOT
NULL
,
"balanceConfig"
text
,
"createTime"
text
,
"updateTime"
text
,
"balanceDesc"
text
(
255
),
"defaultConfig"
text
NOT
NULL
,
"clusterConfig"
text
NOT
NULL
DEFAULT
''
,
"appName"
text
(
255
)
NOT
NULL
DEFAULT
''
,
"static"
text
,
"staticCluster"
text
"balanceID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"balanceName"
text
(
255
)
NOT
NULL
,
"serviceName"
text
(
255
)
NOT
NULL
,
"balanceConfig"
text
,
"createTime"
text
,
"updateTime"
text
,
"balanceDesc"
text
(
255
),
"defaultConfig"
text
NOT
NULL
,
"clusterConfig"
text
NOT
NULL
DEFAULT
''
,
"appName"
text
(
255
)
NOT
NULL
DEFAULT
''
,
"static"
text
,
"staticCluster"
text
);
-- ----------------------------
...
...
@@ -38,12 +38,12 @@ CREATE TABLE "goku_balance" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_cluster"
;
CREATE
TABLE
"goku_cluster"
(
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
20
)
NOT
NULL
,
"title"
text
(
50
)
NOT
NULL
,
"note"
text
(
255
),
"db"
text
,
"redis"
text
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
20
)
NOT
NULL
,
"title"
text
(
50
)
NOT
NULL
,
"note"
text
(
255
),
"db"
text
,
"redis"
text
);
-- ----------------------------
...
...
@@ -51,15 +51,15 @@ CREATE TABLE "goku_cluster" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_config_log"
;
CREATE
TABLE
"goku_config_log"
(
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
20
)
NOT
NULL
,
"enable"
integer
(
11
)
NOT
NULL
DEFAULT
1
,
"dir"
text
(
255
)
NOT
NULL
,
"file"
text
(
255
)
NOT
NULL
,
"period"
text
(
10
)
NOT
NULL
,
"level"
text
(
10
)
NOT
NULL
,
"fields"
text
NOT
NULL
,
"expire"
integer
(
11
)
NOT
NULL
DEFAULT
3
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
20
)
NOT
NULL
,
"enable"
integer
(
11
)
NOT
NULL
DEFAULT
1
,
"dir"
text
(
255
)
NOT
NULL
,
"file"
text
(
255
)
NOT
NULL
,
"period"
text
(
10
)
NOT
NULL
,
"level"
text
(
10
)
NOT
NULL
,
"fields"
text
NOT
NULL
,
"expire"
integer
(
11
)
NOT
NULL
DEFAULT
3
);
-- ----------------------------
...
...
@@ -67,17 +67,17 @@ CREATE TABLE "goku_config_log" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_conn_plugin_api"
;
CREATE
TABLE
"goku_conn_plugin_api"
(
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"apiID"
integer
(
11
)
NOT
NULL
,
"pluginName"
text
(
255
)
NOT
NULL
,
"pluginConfig"
text
,
"strategyID"
text
(
255
)
NOT
NULL
,
"pluginInfo"
text
,
"createTime"
text
,
"updateTime"
text
,
"pluginStatus"
integer
(
4
),
"updateTag"
text
(
32
),
"updaterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"apiID"
integer
(
11
)
NOT
NULL
,
"pluginName"
text
(
255
)
NOT
NULL
,
"pluginConfig"
text
,
"strategyID"
text
(
255
)
NOT
NULL
,
"pluginInfo"
text
,
"createTime"
text
,
"updateTime"
text
,
"pluginStatus"
integer
(
4
),
"updateTag"
text
(
32
),
"updaterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
);
-- ----------------------------
...
...
@@ -85,16 +85,16 @@ CREATE TABLE "goku_conn_plugin_api" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_conn_plugin_strategy"
;
CREATE
TABLE
"goku_conn_plugin_strategy"
(
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
255
)
NOT
NULL
,
"pluginName"
text
(
255
)
NOT
NULL
,
"pluginConfig"
text
,
"pluginInfo"
text
,
"createTime"
text
,
"updateTime"
text
,
"pluginStatus"
integer
(
4
),
"updateTag"
text
(
32
),
"updaterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
255
)
NOT
NULL
,
"pluginName"
text
(
255
)
NOT
NULL
,
"pluginConfig"
text
,
"pluginInfo"
text
,
"createTime"
text
,
"updateTime"
text
,
"pluginStatus"
integer
(
4
),
"updateTag"
text
(
32
),
"updaterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
);
-- ----------------------------
...
...
@@ -102,13 +102,13 @@ CREATE TABLE "goku_conn_plugin_strategy" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_conn_strategy_api"
;
CREATE
TABLE
"goku_conn_strategy_api"
(
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
255
)
NOT
NULL
,
"apiID"
integer
(
11
)
NOT
NULL
,
"apiMonitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"strategyMonitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"target"
text
(
255
),
"updateTime"
text
"connID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
255
)
NOT
NULL
,
"apiID"
integer
(
11
)
NOT
NULL
,
"apiMonitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"strategyMonitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"target"
text
(
255
),
"updateTime"
text
);
-- ----------------------------
...
...
@@ -116,26 +116,26 @@ CREATE TABLE "goku_conn_strategy_api" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway"
;
CREATE
TABLE
"goku_gateway"
(
"id"
integer
(
11
)
NOT
NULL
,
"successCode"
text
(
255
)
NOT
NULL
,
"nodeUpdatePeriod"
integer
(
11
)
NOT
NULL
,
"monitorUpdatePeriod"
integer
(
11
)
NOT
NULL
,
"alertStatus"
integer
(
4
)
NOT
NULL
,
"alertPeriodType"
integer
(
4
)
NOT
NULL
,
"alertAddress"
text
(
255
),
"alertLogPath"
text
(
255
),
"sender"
text
(
255
),
"senderPassword"
text
(
255
),
"smtpAddress"
text
(
255
),
"smtpPort"
integer
(
11
)
NOT
NULL
,
"smtpProtocol"
integer
(
4
)
NOT
NULL
,
"receiverList"
text
(
255
),
"monitorTimeout"
integer
(
4
)
NOT
NULL
,
"apiAlertInfo"
text
,
"nodeAlertInfo"
text
,
"redisAlertInfo"
text
,
"versionID"
INTEGER
NOT
NULL
DEFAULT
0
,
PRIMARY
KEY
(
"id"
)
"id"
integer
(
11
)
NOT
NULL
,
"successCode"
text
(
255
)
NOT
NULL
,
"nodeUpdatePeriod"
integer
(
11
)
NOT
NULL
,
"monitorUpdatePeriod"
integer
(
11
)
NOT
NULL
,
"alertStatus"
integer
(
4
)
NOT
NULL
,
"alertPeriodType"
integer
(
4
)
NOT
NULL
,
"alertAddress"
text
(
255
),
"alertLogPath"
text
(
255
),
"sender"
text
(
255
),
"senderPassword"
text
(
255
),
"smtpAddress"
text
(
255
),
"smtpPort"
integer
(
11
)
NOT
NULL
,
"smtpProtocol"
integer
(
4
)
NOT
NULL
,
"receiverList"
text
(
255
),
"monitorTimeout"
integer
(
4
)
NOT
NULL
,
"apiAlertInfo"
text
,
"nodeAlertInfo"
text
,
"redisAlertInfo"
text
,
"versionID"
INTEGER
NOT
NULL
DEFAULT
0
,
PRIMARY
KEY
(
"id"
)
);
INSERT
INTO
"goku_gateway"
VALUES
(
1
,
200
,
1
,
30
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
25
,
0
,
NULL
,
0
,
NULL
,
NULL
,
NULL
,
0
);
...
...
@@ -145,15 +145,15 @@ INSERT INTO "goku_gateway" VALUES (1, 200, 1, 30, 0, 0, NULL, NULL, NULL, NULL,
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_alert"
;
CREATE
TABLE
"goku_gateway_alert"
(
"alertID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"requestURL"
text
(
255
)
NOT
NULL
,
"targetServer"
text
(
255
)
NOT
NULL
,
"alertPeriodType"
integer
(
4
)
NOT
NULL
,
"alertCount"
integer
(
11
)
NOT
NULL
,
"updateTime"
text
,
"targetURL"
text
(
255
)
NOT
NULL
,
"clusterName"
text
(
255
),
"nodeIP"
text
(
255
)
"alertID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"requestURL"
text
(
255
)
NOT
NULL
,
"targetServer"
text
(
255
)
NOT
NULL
,
"alertPeriodType"
integer
(
4
)
NOT
NULL
,
"alertCount"
integer
(
11
)
NOT
NULL
,
"updateTime"
text
,
"targetURL"
text
(
255
)
NOT
NULL
,
"clusterName"
text
(
255
),
"nodeIP"
text
(
255
)
);
-- ----------------------------
...
...
@@ -161,33 +161,34 @@ CREATE TABLE "goku_gateway_alert" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_api"
;
CREATE
TABLE
"goku_gateway_api"
(
"apiID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupID"
integer
(
11
)
NOT
NULL
,
"projectID"
integer
(
11
)
NOT
NULL
,
"requestURL"
text
(
255
)
NOT
NULL
,
"apiName"
text
(
255
)
NOT
NULL
,
"requestMethod"
text
(
255
)
NOT
NULL
,
"targetServer"
text
(
255
),
"targetURL"
text
(
255
),
"targetMethod"
text
(
255
),
"isFollow"
text
(
32
)
NOT
NULL
,
"stripPrefix"
text
(
32
),
"timeout"
integer
(
11
),
"retryCount"
integer
(
11
),
"createTime"
text
,
"updateTime"
text
,
"alertValve"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"monitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
1
,
"managerID"
integer
(
11
)
NOT
NULL
,
"lastUpdateUserID"
integer
(
11
)
NOT
NULL
,
"createUserID"
integer
(
11
)
NOT
NULL
,
"balanceName"
text
(
255
),
"protocol"
text
(
20
),
"stripSlash"
text
(
32
),
"apiType"
integer
NOT
NULL
DEFAULT
0
,
"responseDataType"
text
NOT
NULL
DEFAULT
origin
,
"linkApis"
TEXT
,
"staticResponse"
TEXT
"apiID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupID"
integer
(
11
)
NOT
NULL
,
"projectID"
integer
(
11
)
NOT
NULL
,
"requestURL"
text
(
255
)
NOT
NULL
,
"apiName"
text
(
255
)
NOT
NULL
,
"alias"
text
(
255
),
"requestMethod"
text
(
255
)
NOT
NULL
,
"targetServer"
text
(
255
),
"targetURL"
text
(
255
),
"targetMethod"
text
(
255
),
"isFollow"
text
(
32
)
NOT
NULL
,
"stripPrefix"
text
(
32
),
"timeout"
integer
(
11
),
"retryCount"
integer
(
11
),
"createTime"
text
,
"updateTime"
text
,
"alertValve"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"monitorStatus"
integer
(
11
)
NOT
NULL
DEFAULT
1
,
"managerID"
integer
(
11
)
NOT
NULL
,
"lastUpdateUserID"
integer
(
11
)
NOT
NULL
,
"createUserID"
integer
(
11
)
NOT
NULL
,
"balanceName"
text
(
255
),
"protocol"
text
(
20
),
"stripSlash"
text
(
32
),
"apiType"
integer
NOT
NULL
DEFAULT
0
,
"responseDataType"
text
NOT
NULL
DEFAULT
origin
,
"linkApis"
TEXT
,
"staticResponse"
TEXT
);
-- ----------------------------
...
...
@@ -195,12 +196,12 @@ CREATE TABLE "goku_gateway_api" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_api_group"
;
CREATE
TABLE
"goku_gateway_api_group"
(
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"projectID"
integer
(
11
)
NOT
NULL
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupPath"
text
(
255
),
"groupDepth"
text
(
255
),
"parentGroupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"projectID"
integer
(
11
)
NOT
NULL
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupPath"
text
(
255
),
"groupDepth"
text
(
255
),
"parentGroupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
);
-- ----------------------------
...
...
@@ -208,9 +209,9 @@ CREATE TABLE "goku_gateway_api_group" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_permission_group"
;
CREATE
TABLE
"goku_gateway_permission_group"
(
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"permissions"
text
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"permissions"
text
);
-- ----------------------------
...
...
@@ -218,10 +219,10 @@ CREATE TABLE "goku_gateway_permission_group" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_project"
;
CREATE
TABLE
"goku_gateway_project"
(
"projectID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"projectName"
text
(
255
)
NOT
NULL
,
"createTime"
text
,
"updateTime"
text
"projectID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"projectName"
text
(
255
)
NOT
NULL
,
"createTime"
text
,
"updateTime"
text
);
-- ----------------------------
...
...
@@ -229,16 +230,16 @@ CREATE TABLE "goku_gateway_project" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_strategy"
;
CREATE
TABLE
"goku_gateway_strategy"
(
"strategyID"
text
(
32
)
NOT
NULL
,
"strategyName"
text
(
255
)
NOT
NULL
,
"updateTime"
text
,
"createTime"
text
,
"auth"
text
(
255
),
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"monitorStatus"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"enableStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"strategyType"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
PRIMARY
KEY
(
"strategyID"
)
"strategyID"
text
(
32
)
NOT
NULL
,
"strategyName"
text
(
255
)
NOT
NULL
,
"updateTime"
text
,
"createTime"
text
,
"auth"
text
(
255
),
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"monitorStatus"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"enableStatus"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"strategyType"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
PRIMARY
KEY
(
"strategyID"
)
);
-- ----------------------------
...
...
@@ -251,9 +252,9 @@ INSERT INTO "goku_gateway_strategy" VALUES ('RGAtKBd', '开放策略', '2019-10-
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_strategy_group"
;
CREATE
TABLE
"goku_gateway_strategy_group"
(
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupType"
integer
(
11
)
NOT
NULL
DEFAULT
0
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupType"
integer
(
11
)
NOT
NULL
DEFAULT
0
);
-- ----------------------------
...
...
@@ -266,16 +267,16 @@ INSERT INTO "goku_gateway_strategy_group" VALUES (1, '开放分组', 1);
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_gateway_version_config"
;
CREATE
TABLE
"goku_gateway_version_config"
(
"versionID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
TEXT
NOT
NULL
,
"version"
TEXT
,
"remark"
TEXT
,
"createTime"
TEXT
,
"updateTime"
TEXT
,
"publishTime"
TEXT
,
"config"
TEXT
,
"balanceConfig"
TEXT
,
"discoverConfig"
TEXT
"versionID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
TEXT
NOT
NULL
,
"version"
TEXT
,
"remark"
TEXT
,
"createTime"
TEXT
,
"updateTime"
TEXT
,
"publishTime"
TEXT
,
"config"
TEXT
,
"balanceConfig"
TEXT
,
"discoverConfig"
TEXT
);
-- ----------------------------
...
...
@@ -283,23 +284,23 @@ CREATE TABLE "goku_gateway_version_config" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_monitor_cluster"
;
CREATE
TABLE
"goku_monitor_cluster"
(
"recordID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
20
)
NOT
NULL
,
"apiID"
integer
(
11
)
NOT
NULL
,
"clusterID"
integer
(
11
)
NOT
NULL
,
"hour"
integer
(
11
)
NOT
NULL
,
"gatewayRequestCount"
integer
(
11
)
NOT
NULL
,
"gatewaySuccessCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus2xxCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus4xxCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus5xxCount"
integer
(
11
)
NOT
NULL
,
"proxyRequestCount"
integer
(
11
)
NOT
NULL
,
"proxySuccessCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus2xxCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus4xxCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus5xxCount"
integer
(
11
)
NOT
NULL
,
"proxyTimeoutCount"
integer
(
11
)
NOT
NULL
,
"updateTime"
text
NOT
NULL
"recordID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"strategyID"
text
(
20
)
NOT
NULL
,
"apiID"
integer
(
11
)
NOT
NULL
,
"clusterID"
integer
(
11
)
NOT
NULL
,
"hour"
integer
(
11
)
NOT
NULL
,
"gatewayRequestCount"
integer
(
11
)
NOT
NULL
,
"gatewaySuccessCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus2xxCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus4xxCount"
integer
(
11
)
NOT
NULL
,
"gatewayStatus5xxCount"
integer
(
11
)
NOT
NULL
,
"proxyRequestCount"
integer
(
11
)
NOT
NULL
,
"proxySuccessCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus2xxCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus4xxCount"
integer
(
11
)
NOT
NULL
,
"proxyStatus5xxCount"
integer
(
11
)
NOT
NULL
,
"proxyTimeoutCount"
integer
(
11
)
NOT
NULL
,
"updateTime"
text
NOT
NULL
);
-- ----------------------------
...
...
@@ -307,10 +308,10 @@ CREATE TABLE "goku_monitor_cluster" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_node_group"
;
CREATE
TABLE
"goku_node_group"
(
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupType"
integer
(
4
)
NOT
NULL
,
"clusterID"
integer
(
11
)
NOT
NULL
"groupID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"groupName"
text
(
255
)
NOT
NULL
,
"groupType"
integer
(
4
)
NOT
NULL
,
"clusterID"
integer
(
11
)
NOT
NULL
);
-- ----------------------------
...
...
@@ -318,23 +319,23 @@ CREATE TABLE "goku_node_group" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_node_info"
;
CREATE
TABLE
"goku_node_info"
(
"nodeID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"nodeIP"
text
(
255
)
NOT
NULL
,
"updateStatus"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"createTime"
text
,
"updateTime"
text
,
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"nodeName"
text
(
255
)
NOT
NULL
,
"nodePort"
text
(
255
),
"nodeStatus"
integer
(
11
)
NOT
NULL
,
"version"
text
(
255
),
"sshPort"
text
(
255
)
DEFAULT
22
,
"userName"
text
(
255
),
"password"
text
(
255
),
"gatewayPath"
text
(
255
),
"key"
text
,
"authMethod"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"clusterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
"nodeID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"nodeIP"
text
(
255
)
NOT
NULL
,
"updateStatus"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"createTime"
text
,
"updateTime"
text
,
"groupID"
integer
(
11
)
NOT
NULL
DEFAULT
0
,
"nodeName"
text
(
255
)
NOT
NULL
,
"nodePort"
text
(
255
),
"nodeStatus"
integer
(
11
)
NOT
NULL
,
"version"
text
(
255
),
"sshPort"
text
(
255
)
DEFAULT
22
,
"userName"
text
(
255
),
"password"
text
(
255
),
"gatewayPath"
text
(
255
),
"key"
text
,
"authMethod"
integer
(
4
)
NOT
NULL
DEFAULT
0
,
"clusterID"
integer
(
11
)
NOT
NULL
DEFAULT
0
);
-- ----------------------------
...
...
@@ -342,19 +343,19 @@ CREATE TABLE "goku_node_info" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_plugin"
;
CREATE
TABLE
"goku_plugin"
(
"pluginID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"pluginName"
text
(
255
)
NOT
NULL
,
"chineseName"
text
(
255
),
"pluginStatus"
integer
(
4
)
NOT
NULL
,
"pluginPriority"
integer
(
4
)
NOT
NULL
,
"pluginConfig"
text
,
"pluginInfo"
text
,
"isStop"
integer
(
4
)
NOT
NULL
,
"pluginType"
integer
(
4
)
NOT
NULL
,
"official"
text
(
255
)
NOT
NULL
,
"pluginDesc"
text
(
255
),
"version"
text
(
255
)
NOT
NULL
,
"isCheck"
integer
(
4
)
NOT
NULL
"pluginID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"pluginName"
text
(
255
)
NOT
NULL
,
"chineseName"
text
(
255
),
"pluginStatus"
integer
(
4
)
NOT
NULL
,
"pluginPriority"
integer
(
4
)
NOT
NULL
,
"pluginConfig"
text
,
"pluginInfo"
text
,
"isStop"
integer
(
4
)
NOT
NULL
,
"pluginType"
integer
(
4
)
NOT
NULL
,
"official"
text
(
255
)
NOT
NULL
,
"pluginDesc"
text
(
255
),
"version"
text
(
255
)
NOT
NULL
,
"isCheck"
integer
(
4
)
NOT
NULL
);
...
...
@@ -363,20 +364,20 @@ CREATE TABLE "goku_plugin" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_service_config"
;
CREATE
TABLE
"goku_service_config"
(
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
255
)
NOT
NULL
,
"default"
integer
(
4
),
"driver"
text
(
20
)
NOT
NULL
,
"desc"
text
NOT
NULL
,
"config"
text
NOT
NULL
,
"clusterConfig"
text
NOT
NULL
,
"healthCheck"
integer
(
4
)
NOT
NULL
,
"healthCheckPath"
text
(
255
)
NOT
NULL
,
"healthCheckPeriod"
integer
(
11
)
NOT
NULL
,
"healthCheckCode"
text
(
255
)
NOT
NULL
,
"healthCheckTimeOut"
integer
(
11
)
NOT
NULL
,
"createTime"
text
NOT
NULL
,
"updateTime"
text
NOT
NULL
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
255
)
NOT
NULL
,
"default"
integer
(
4
),
"driver"
text
(
20
)
NOT
NULL
,
"desc"
text
NOT
NULL
,
"config"
text
NOT
NULL
,
"clusterConfig"
text
NOT
NULL
,
"healthCheck"
integer
(
4
)
NOT
NULL
,
"healthCheckPath"
text
(
255
)
NOT
NULL
,
"healthCheckPeriod"
integer
(
11
)
NOT
NULL
,
"healthCheckCode"
text
(
255
)
NOT
NULL
,
"healthCheckTimeOut"
integer
(
11
)
NOT
NULL
,
"createTime"
text
NOT
NULL
,
"updateTime"
text
NOT
NULL
);
-- ----------------------------
...
...
@@ -384,14 +385,14 @@ CREATE TABLE "goku_service_config" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_service_discovery"
;
CREATE
TABLE
"goku_service_discovery"
(
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
30
),
"type"
text
(
20
),
"remark"
text
(
500
),
"config"
text
,
"default"
text
(
255
),
"createTime"
text
,
"updateTime"
text
"id"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
,
"name"
text
(
30
),
"type"
text
(
20
),
"remark"
text
(
500
),
"config"
text
,
"default"
text
(
255
),
"createTime"
text
,
"updateTime"
text
);
-- ----------------------------
...
...
@@ -399,9 +400,9 @@ CREATE TABLE "goku_service_discovery" (
-- ----------------------------
DROP
TABLE
IF
EXISTS
"goku_table_update_record"
;
CREATE
TABLE
"goku_table_update_record"
(
"name"
text
(
64
)
NOT
NULL
,
"updateTime"
text
NOT
NULL
,
"tableID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
"name"
text
(
64
)
NOT
NULL
,
"updateTime"
text
NOT
NULL
,
"tableID"
integer
NOT
NULL
PRIMARY
KEY
AUTOINCREMENT
);
...
...
@@ -427,17 +428,17 @@ UPDATE "sqlite_sequence" SET seq = 1 WHERE name = 'goku_admin';
-- Indexes structure for table goku_balance
-- ----------------------------
CREATE
INDEX
"balanceName"
ON
"goku_balance"
(
"balanceName"
ASC
);
ON
"goku_balance"
(
"balanceName"
ASC
);
-- ----------------------------
-- Indexes structure for table goku_cluster
-- ----------------------------
CREATE
INDEX
"name"
ON
"goku_cluster"
(
"name"
ASC
);
ON
"goku_cluster"
(
"name"
ASC
);
-- ----------------------------
-- Auto increment value for goku_config_log
...
...
build/node/resources/run.sh
浏览文件 @
f63a55b4
...
...
@@ -26,34 +26,32 @@ start() {
ADMIN
=
$1
INSTANCE
=
$2
if
[[
"INSTANCE"
=
""
]]
;
then
PORT
=
${
ENV_INSTANCE
}
CONFIG_PATH
=
$WORK_PATH
/goku-node.json
RUN_MODEL
=
"console"
if
[
-f
"
$CONFIG_PATH
"
]
;
then
RUN_MODEL
=
"config"
fi
if
[[
"
$ADMIN
"
=
""
]]
;
then
ADMIN
=
${
ENV_ADMIN
}
fi
if
[[
"
$INSTANCE
"
=
""
]]
;
then
INSTANCE
=
${
ENV_INSTANCE
}
fi
if
[[
"
$ADMIN
"
=
"
"
]]
;
then
if
[[
"
$ADMIN
"
=
=
""
&&
"
$RUN_MODEL
"
==
"console
"
]]
;
then
echo
"start fail :need admin url"
exit
1
fi
mkdir
-p
$WORK_PATH
/logs
echo
-e
"ENV_PORT=
$PORT
\n
ENV_ADMIN=
$ADMIN
"
>
$WORK_PATH
/
$PROG
.env
if
[[
-e
"
$WORK_PATH
/
$PROG
.pid"
]]
;
then
## Program is running, exit with error.
echo
"Error!
$PROG
is currently running!"
1>&2
exit
1
else
time
=
$(
date
"+%Y%m%d-%H%M%S"
)
## Change from /dev/null to something like /var/log/$PROG if you want to save output.
nohup
$PROG_PATH
/
$PROG
--instance
=
$INSTANCE
--admin
=
$ADMIN
2>&1
>
"
$WORK_PATH
/logs/stdout-
$PROG
-
$time
.log"
&
pid
=
$!
echo
"
$PROG
started"
echo
$pid
>
"
$WORK_PATH
/
$PROG
.pid"
if
[[
"
$ADMIN
"
!=
"NULL"
]]
;
then
$PROG_PATH
/
$PROG
--admin
=
$ADMIN
--instance
=
$INSTANCE
else
$PROG_PATH
/
$PROG
--config
=
$CONFIG_PATH
fi
}
...
...
@@ -104,3 +102,4 @@ case "$1" in
exit
1
;;
esac
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录