diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5cb0793..1f5f6248 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,6 +161,7 @@ set(ProjectName "startup")
file(GLOB soruces src/*.cc)
file(GLOB headers src/*.h)
file(GLOB_RECURSE proto ./src/proto/*.proto)
+file(GLOB_RECURSE pycli ./src/pycli/*.py)
file(GLOB_RECURSE lua ./src/lua/*.lua)
file(GLOB_RECURSE plugin ./config//plugin/*.xml)
file(GLOB_RECURSE config ./config/node/*.json)
@@ -169,6 +170,7 @@ source_group_by_dir(proto)
source_group_by_dir(lua)
source_group_by_dir(plugin)
source_group_by_dir(config)
+source_group_by_dir(pycli)
add_executable(${ProjectName} ${soruces} ${headers} ${proto} ${lua} ${plugin} ${config})
diff --git a/config/plugin/backstage.xml b/config/plugin/backstage.xml
index e7b38a0f..532ee8a1 100644
--- a/config/plugin/backstage.xml
+++ b/config/plugin/backstage.xml
@@ -3,6 +3,6 @@
-
+
diff --git a/config/plugin/db_proxy.xml b/config/plugin/db_proxy.xml
index 8372ad3e..5176ebba 100644
--- a/config/plugin/db_proxy.xml
+++ b/config/plugin/db_proxy.xml
@@ -3,10 +3,10 @@
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/config/plugin/ds_mgr.xml b/config/plugin/ds_mgr.xml
index e0d01c6a..4af26fad 100644
--- a/config/plugin/ds_mgr.xml
+++ b/config/plugin/ds_mgr.xml
@@ -3,6 +3,6 @@
-
+
\ No newline at end of file
diff --git a/config/plugin/game.xml b/config/plugin/game.xml
index c860891d..ecee73c0 100644
--- a/config/plugin/game.xml
+++ b/config/plugin/game.xml
@@ -3,6 +3,6 @@
-
+
\ No newline at end of file
diff --git a/config/plugin/master.xml b/config/plugin/master.xml
index 2874b45d..a45007e4 100644
--- a/config/plugin/master.xml
+++ b/config/plugin/master.xml
@@ -3,6 +3,6 @@
-
+
\ No newline at end of file
diff --git a/config/plugin/player.xml b/config/plugin/player.xml
index b6ac8108..ead2d9e9 100644
--- a/config/plugin/player.xml
+++ b/config/plugin/player.xml
@@ -9,6 +9,6 @@
-
+
diff --git a/config/plugin/proxy.xml b/config/plugin/proxy.xml
index a0689d10..4fbb6305 100644
--- a/config/plugin/proxy.xml
+++ b/config/plugin/proxy.xml
@@ -1,11 +1,10 @@
-
-
+
\ No newline at end of file
diff --git a/config/plugin/web.xml b/config/plugin/web.xml
index ae4feadc..8fdc9cd2 100644
--- a/config/plugin/web.xml
+++ b/config/plugin/web.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/config/plugin/world.xml b/config/plugin/world.xml
index d079557f..452f6266 100644
--- a/config/plugin/world.xml
+++ b/config/plugin/world.xml
@@ -8,6 +8,6 @@
-
+
\ No newline at end of file
diff --git a/docker/build_image.sh b/docker/build_image.sh
index 17c72deb..aad99e15 100755
--- a/docker/build_image.sh
+++ b/docker/build_image.sh
@@ -3,22 +3,28 @@
cd $(dirname $0)
source ../tools/common.sh
-build_type='docker'
+version=$1
+if [[ $version == "" ]];then
+ version="1.2"
+fi
+
+dockerfile=./docker/src
is_build_third_party=0
is_build_sqkctl=0
-src_image_tag=pwnsky/squick_src:1.1
-bin_image_tag=pwnsky/squick:1.1
+src_image_tag=pwnsky/squick_src:$version
+bin_image_tag=pwnsky/squick:$version
build_container=squick_src_build
cd $project_path
echo "Build src image"
-docker build . -t $src_image_tag -f ./docker/src
+docker build . -t $src_image_tag -f $dockerfile
check_err
echo "Export binary files"
docker run -d --name $build_container $src_image_tag
check_err
+mkdir -p ./cache
rm -rf ./cache/docker_deploy
docker cp $build_container:/squick/deploy ./cache/docker_deploy
check_err
@@ -33,5 +39,9 @@ echo "Build release image"
docker build . -t $bin_image_tag -f ./docker/release
check_err
+echo "Exporting the image"
+docker save -o ./cache/squick_$version.tar pwnsky/squick:$version
+check_err
+
echo "Build image ok"
print_ok
diff --git a/docker/release b/docker/release
index bfe5f204..4622bd0c 100644
--- a/docker/release
+++ b/docker/release
@@ -1,18 +1,11 @@
-# cd {squick_project}
-# docker build . -t i0gan/squick_src:1.1 -f ./docker/src
-# docker run -d --name squick_src i0gan/squick_src:1.1
-# rm -rf ./cache/docker_deploy
-# docker cp squick_src:/squick/deploy ./cache/docker_deploy
-
-# docker build . -t i0gan/squick:1.1 -f ./docker/release
-# docker run -it --name squick i0gan/squick:1.1
-
FROM ubuntu:22.04
+
# Set env
ARG DEBIAN_FRONTEND=noninteractive
+RUN apt update && apt install -y dos2unix vim net-tools
# copy from docker builded files
COPY ./cache/docker_deploy /squick
WORKDIR /squick
RUN chmod +x /squick/script/*.sh
-CMD bash /squick/script/squick.sh
\ No newline at end of file
+CMD bash /squick/script/squick.sh
diff --git a/docker/release_mini b/docker/release_mini
new file mode 100644
index 00000000..bfe5f204
--- /dev/null
+++ b/docker/release_mini
@@ -0,0 +1,18 @@
+# cd {squick_project}
+# docker build . -t i0gan/squick_src:1.1 -f ./docker/src
+# docker run -d --name squick_src i0gan/squick_src:1.1
+# rm -rf ./cache/docker_deploy
+# docker cp squick_src:/squick/deploy ./cache/docker_deploy
+
+# docker build . -t i0gan/squick:1.1 -f ./docker/release
+# docker run -it --name squick i0gan/squick:1.1
+
+FROM ubuntu:22.04
+# Set env
+ARG DEBIAN_FRONTEND=noninteractive
+
+# copy from docker builded files
+COPY ./cache/docker_deploy /squick
+WORKDIR /squick
+RUN chmod +x /squick/script/*.sh
+CMD bash /squick/script/squick.sh
\ No newline at end of file
diff --git a/docker/src_dep b/docker/src_dep
new file mode 100644
index 00000000..3753f0ab
--- /dev/null
+++ b/docker/src_dep
@@ -0,0 +1,15 @@
+FROM pwnsky/squick_src:1.1
+
+COPY . /squick_dep
+
+RUN rm -rf /squick_dep/third_party && mv /squick/third_party /squick_dep && rm -rf /squick && mv /squick_dep /squick
+
+WORKDIR /squick
+RUN cd tools && chmod +x *.sh && dos2unix *.sh
+RUN cd script && chmod +x *.sh && dos2unix *.sh
+
+RUN bash ./tools/clean_squick.sh
+RUN bash ./tools/build_sqkctl.sh
+RUN bash ./tools/build_squick.sh
+RUN bash ./tools/generate_deploy.sh
+CMD bash /squick/script/squick.sh
diff --git a/kubernetes/gen_k8s_config.sh b/kubernetes/gen_k8s_config.sh
index 99b989f0..340f2e12 100755
--- a/kubernetes/gen_k8s_config.sh
+++ b/kubernetes/gen_k8s_config.sh
@@ -1,6 +1,9 @@
#! /bin/bash
namespace="pwnsky"
-image="pwnsky"
+image="pwnsky/squick:1.1"
+
+rm -rf k8s_cfg
+mkdir -p k8s_cfg
diff --git a/kubernetes/tmpl/backstage.yaml b/kubernetes/tmpl/backstage.yaml
new file mode 100644
index 00000000..1c565056
--- /dev/null
+++ b/kubernetes/tmpl/backstage.yaml
@@ -0,0 +1,39 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: backstage
+ namespace: default
+ labels:
+ app: squick
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=backstage id=`expr 2500 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
diff --git a/kubernetes/node/master.yaml b/kubernetes/tmpl/db_proxy.yaml
similarity index 75%
rename from kubernetes/node/master.yaml
rename to kubernetes/tmpl/db_proxy.yaml
index ed71fb35..ceaa9427 100644
--- a/kubernetes/node/master.yaml
+++ b/kubernetes/tmpl/db_proxy.yaml
@@ -2,13 +2,12 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
- name: squick-master
+ name: db-proxy
namespace: default
labels:
app: squick
spec:
- serviceName: "svc-squick-master"
- replicas: 2
+ replicas: 3
selector:
matchLabels:
app: squick
@@ -19,12 +18,12 @@ spec:
spec:
containers:
- name: squick
- image: pwnsky/squick:1.1
+ image: pwnsky/squick:1.2
imagePullPolicy: Never
command: ["/bin/bash", "-c"]
args:
- >
- /squick/script/squick.sh type=master id=1000${HOSTNAME##*-} area=0 ip=$(POD_IP) port=10001 http_port=50000 logshow=0
+ /squick/script/squick.sh type=proxy id=`expr 2000 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0
env:
- name: POD_NAME
valueFrom:
diff --git a/kubernetes/tmpl/master.yaml b/kubernetes/tmpl/master.yaml
new file mode 100644
index 00000000..f2f78162
--- /dev/null
+++ b/kubernetes/tmpl/master.yaml
@@ -0,0 +1,53 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: squick-master
+ namespace: default
+ labels:
+ app: squick
+spec:
+ serviceName: "svc-squick-master"
+ replicas: 3
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=master id=`expr 1 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10001 http_port=50000 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: svc-squick-master
+spec:
+ selector:
+ app: squick
+ ports:
+ - protocol: TCP
+ port: 10001
+ targetPort: 10001
+ type: ClusterIP
diff --git a/kubernetes/tmpl/player.yaml b/kubernetes/tmpl/player.yaml
new file mode 100644
index 00000000..fe4ccee7
--- /dev/null
+++ b/kubernetes/tmpl/player.yaml
@@ -0,0 +1,40 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: squick-player
+ namespace: default
+ labels:
+ app: squick
+spec:
+ #serviceName: "svc-squick-proxy"
+ replicas: 3
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=player id=`expr 1000 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10401 master_ip=svc-squick-master master_port=10001 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
diff --git a/kubernetes/tmpl/proxy.yaml b/kubernetes/tmpl/proxy.yaml
new file mode 100644
index 00000000..5cfe2919
--- /dev/null
+++ b/kubernetes/tmpl/proxy.yaml
@@ -0,0 +1,40 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: proxy
+ namespace: default
+ labels:
+ app: squick
+spec:
+ #serviceName: "svc-squick-proxy"
+ replicas: 3
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=proxy id=`expr 500 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
diff --git a/kubernetes/tmpl/web.yaml b/kubernetes/tmpl/web.yaml
new file mode 100644
index 00000000..d007a1d4
--- /dev/null
+++ b/kubernetes/tmpl/web.yaml
@@ -0,0 +1,40 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: web
+ namespace: default
+ labels:
+ app: squick
+spec:
+ serviceName: "svc-squick-web"
+ replicas: 3
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=proxy id=`expr 2000 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
diff --git a/kubernetes/tmpl/world.yaml b/kubernetes/tmpl/world.yaml
new file mode 100644
index 00000000..648ad298
--- /dev/null
+++ b/kubernetes/tmpl/world.yaml
@@ -0,0 +1,40 @@
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: world
+ namespace: default
+ labels:
+ app: squick
+spec:
+ serviceName: "svc-squick-web"
+ replicas: 3
+ selector:
+ matchLabels:
+ app: squick
+ template:
+ metadata:
+ labels:
+ app: squick
+ spec:
+ containers:
+ - name: squick
+ image: pwnsky/squick:1.2
+ imagePullPolicy: Never
+ command: ["/bin/bash", "-c"]
+ args:
+ - >
+ /squick/script/squick.sh type=world id=`expr 2000 + ${HOSTNAME##*-}` area=0 ip=$(POD_IP) port=10501 ws_port=10502 master_ip=svc-squick-master master_port=10001 logshow=0
+ env:
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
diff --git a/resource/excel/Group.xlsx b/resource/excel/Group.xlsx
index 70021905..59dab188 100644
Binary files a/resource/excel/Group.xlsx and b/resource/excel/Group.xlsx differ
diff --git a/resource/excel/Object.xlsx b/resource/excel/Object.xlsx
new file mode 100644
index 00000000..f83bb0da
Binary files /dev/null and b/resource/excel/Object.xlsx differ
diff --git a/resource/excel/Player.xlsx b/resource/excel/Player.xlsx
index 24005403..4f1ff835 100644
Binary files a/resource/excel/Player.xlsx and b/resource/excel/Player.xlsx differ
diff --git a/resource/excel/Scene.xlsx b/resource/excel/Scene.xlsx
index ff8ac005..d8c0de6b 100644
Binary files a/resource/excel/Scene.xlsx and b/resource/excel/Scene.xlsx differ
diff --git a/resource/excel/common/IObject.xlsx b/resource/excel/common/IObject.xlsx
index ef76d7cd..d95586bd 100644
Binary files a/resource/excel/common/IObject.xlsx and b/resource/excel/common/IObject.xlsx differ
diff --git a/resource/excel/example/Property.xlsx b/resource/excel/example/Property.xlsx
index cb63180d..fa41e721 100644
Binary files a/resource/excel/example/Property.xlsx and b/resource/excel/example/Property.xlsx differ
diff --git a/resource/excel/example/Record.xlsx b/resource/excel/example/Record.xlsx
index 4d7e1e6a..637423b2 100644
Binary files a/resource/excel/example/Record.xlsx and b/resource/excel/example/Record.xlsx differ
diff --git a/src/lua/common/module_mgr.lua b/src/lua/common/module_mgr.lua
index 0384d12a..08af5896 100644
--- a/src/lua/common/module_mgr.lua
+++ b/src/lua/common/module_mgr.lua
@@ -6,7 +6,8 @@
-----------------------------------------------------------------------------
ModuleMgr = {
- modules = {}
+ modules = {},
+ modules_info = {}
}
-- pre_path: 模块路径
@@ -27,14 +28,15 @@ function ModuleMgr:Register(pre_path, list)
Squick:LogInfo("lua start to load " .. name);
local old_module = ModuleMgr.modules[name]
- local object = require(path);
- if object then
+ local new_module = require(path);
+ if new_module then
if old_module ~= nil then
- Squick:LogInfo("reload " .. path.. " succeed");
- -- 只更新函数
+ Squick:LogInfo("Begin hot reload " .. path);
+ self:HotReload(old_module, new_module)
+ Squick:LogInfo("Hot reload " .. path.. " succeed");
else
- ModuleMgr.modules[name] = object -- 加载全部
+ ModuleMgr.modules[name] = new_module -- 加载全部
Squick:LogInfo("load " .. path .. " succeed");
end
else
@@ -47,8 +49,13 @@ function ModuleMgr:Register(pre_path, list)
return true
end
-function ModuleMgr:HotReload()
-
+function ModuleMgr:HotReload(old_module, new_module)
+ for key, value in pairs(new_module) do
+ if type(value) == "function" then
+ Squick:LogInfo("reloading function " .. key)
+ old_module[key] = value
+ end
+ end
end
function ModuleMgr:Start()
diff --git a/src/lua/main.lua b/src/lua/main.lua
index dff3b2da..effeb037 100644
--- a/src/lua/main.lua
+++ b/src/lua/main.lua
@@ -16,6 +16,7 @@ function Print(...)
end
function Require(file)
+ package.loaded[file] = nil
require(file)
end
diff --git a/src/node/backstage/golib/go.mod b/src/node/backstage/golib/go.mod
new file mode 100644
index 00000000..c433d081
--- /dev/null
+++ b/src/node/backstage/golib/go.mod
@@ -0,0 +1,38 @@
+module golib
+
+go 1.22.5
+
+require (
+ github.com/gin-gonic/gin v1.10.0
+ github.com/go-pay/gopay v1.5.104
+ github.com/go-pay/xlog v0.0.3
+)
+
+require (
+ github.com/bytedance/sonic v1.11.6 // indirect
+ github.com/bytedance/sonic/loader v0.1.1 // indirect
+ github.com/cloudwego/base64x v0.1.4 // indirect
+ github.com/cloudwego/iasm v0.2.0 // indirect
+ github.com/gabriel-vasile/mimetype v1.4.3 // indirect
+ github.com/gin-contrib/sse v0.1.0 // indirect
+ github.com/go-playground/locales v0.14.1 // indirect
+ github.com/go-playground/universal-translator v0.18.1 // indirect
+ github.com/go-playground/validator/v10 v10.20.0 // indirect
+ github.com/goccy/go-json v0.10.2 // indirect
+ github.com/json-iterator/go v1.1.12 // indirect
+ github.com/klauspost/cpuid/v2 v2.2.7 // indirect
+ github.com/leodido/go-urn v1.4.0 // indirect
+ github.com/mattn/go-isatty v0.0.20 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.2 // indirect
+ github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
+ github.com/ugorji/go/codec v1.2.12 // indirect
+ golang.org/x/arch v0.8.0 // indirect
+ golang.org/x/crypto v0.26.0 // indirect
+ golang.org/x/net v0.25.0 // indirect
+ golang.org/x/sys v0.23.0 // indirect
+ golang.org/x/text v0.17.0 // indirect
+ google.golang.org/protobuf v1.34.1 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/src/node/backstage/golib/go.sum b/src/node/backstage/golib/go.sum
new file mode 100644
index 00000000..f3f25113
--- /dev/null
+++ b/src/node/backstage/golib/go.sum
@@ -0,0 +1,95 @@
+github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
+github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
+github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
+github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
+github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
+github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
+github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
+github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
+github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
+github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
+github.com/go-pay/gopay v1.5.104 h1:XMftoDnMf/2P3o11jYzqvAzAihum5fVPQVmQ6LgSeEY=
+github.com/go-pay/gopay v1.5.104/go.mod h1:1Ywz2i8x96NrFa+F0TKDF7tQl7AZs4DxAc0kh069gJg=
+github.com/go-pay/util v0.0.3 h1:0OjERb7MAVpM2gLPnBESLdMsosYyJ4i31V2/YZBiPjw=
+github.com/go-pay/util v0.0.3/go.mod h1:qM8VbyF1n7YAPZBSJONSPMPsPedhUTktewUAdf1AjPg=
+github.com/go-pay/xlog v0.0.3 h1:avyMhCL/JgBHreoGx/am/kHxfs1udDOAeVqbmzP/Yes=
+github.com/go-pay/xlog v0.0.3/go.mod h1:mH47xbobrdsSHWsmFtSF5agWbMHFP+tK0ZbVCk5OAEw=
+github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
+github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
+github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
+github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
+github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
+github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
+github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
+github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
+github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
+github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
+github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
+github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
+github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
+github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
+github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
+github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
+github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
+github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
+github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
+golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
+golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
+golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
+golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
+golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
+golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
+google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
diff --git a/src/node/backstage/golib/main.go b/src/node/backstage/golib/main.go
new file mode 100644
index 00000000..51b9ea05
--- /dev/null
+++ b/src/node/backstage/golib/main.go
@@ -0,0 +1,38 @@
+package main
+
+import "C"
+
+import (
+ "fmt"
+ "github.com/go-pay/gopay"
+ "github.com/go-pay/xlog"
+ "github.com/gin-gonic/gin"
+ "net/http"
+)
+
+//export Func
+func Func(input int){
+ fmt.Println("I am Func, hello world,input ",input, " over")
+ xlog.Info("GoPay Version: ", gopay.Version)
+}
+
+//export HttpRun
+func HttpRun() {
+ xlog.Info("Hello world 2")
+
+ router := gin.Default()
+ router.GET("/loop", func(c *gin.Context) {
+ i := 0
+ for {
+ i++
+ c.JSON(http.StatusOK, gin.H{
+ "message": "Hello, World!",
+ "counter": i,
+ })
+ break // 在这个例子中,我们只循环一次,然后退出
+ }
+ })
+ go router.Run(":8080")
+}
+
+func main() {}
diff --git a/src/node/proxy/logic/logic_module.cc b/src/node/proxy/logic/logic_module.cc
index 38347a67..b7455d64 100644
--- a/src/node/proxy/logic/logic_module.cc
+++ b/src/node/proxy/logic/logic_module.cc
@@ -14,7 +14,6 @@ bool LogicModule::Destroy() { return true; }
bool LogicModule::Update() { return true; }
bool LogicModule::AfterStart() {
- m_class_ = pm_->FindModule();
m_net_ = pm_->FindModule();
m_net_client_ = pm_->FindModule();
m_log_ = pm_->FindModule();
diff --git a/src/node/proxy/logic/logic_module.h b/src/node/proxy/logic/logic_module.h
index 8f5e8fac..10cecf06 100644
--- a/src/node/proxy/logic/logic_module.h
+++ b/src/node/proxy/logic/logic_module.h
@@ -95,7 +95,6 @@ class LogicModule : public ILogicModule {
protected:
ILogModule *m_log_;
- IClassModule *m_class_;
IScheduleModule *m_schedule_;
INetModule *m_net_;
IWSModule *m_ws_;
diff --git a/src/squick/core/i_property.h b/src/squick/core/i_property.h
index 3235bcbf..74b22d9d 100644
--- a/src/squick/core/i_property.h
+++ b/src/squick/core/i_property.h
@@ -29,21 +29,6 @@ class _SquickExport IProperty : public MemoryCounter {
virtual const DATA_TYPE GetType() const = 0;
virtual const bool GeUsed() const = 0;
virtual const std::string &GetKey() const = 0;
- virtual const bool GetSave() const = 0;
- virtual const bool GetPublic() const = 0;
- virtual const bool GetPrivate() const = 0;
- virtual const bool GetCache() const = 0;
- virtual const bool GetRef() const = 0;
- virtual const bool GetForce() const = 0;
- virtual const bool GetUpload() const = 0;
-
- virtual void SetSave(bool bSave) = 0;
- virtual void SetPublic(bool bPublic) = 0;
- virtual void SetPrivate(bool bPrivate) = 0;
- virtual void SetCache(bool bCache) = 0;
- virtual void SetRef(bool bRef) = 0;
- virtual void SetForce(bool bRef) = 0;
- virtual void SetUpload(bool bUpload) = 0;
virtual INT64 GetInt() const = 0;
virtual int GetInt32() const = 0;
diff --git a/src/squick/core/i_record.h b/src/squick/core/i_record.h
index 076fadcc..8c3d7985 100644
--- a/src/squick/core/i_record.h
+++ b/src/squick/core/i_record.h
@@ -144,26 +144,10 @@ class _SquickExport IRecord : public MemoryCounter {
virtual bool Clear() = 0;
virtual void AddRecordHook(const RECORD_EVENT_FUNCTOR_PTR &cb) = 0;
-
- virtual const bool GetSave() = 0;
- virtual const bool GetPublic() = 0;
- virtual const bool GetPrivate() = 0;
- virtual const bool GetCache() = 0;
- virtual const bool GetRef() = 0;
- virtual const bool GetForce() = 0;
- virtual const bool GetUpload() = 0;
virtual const std::string &GetName() const = 0;
virtual std::shared_ptr