上传测试代码
This commit is contained in:
parent
e98230033f
commit
4adce7d536
17
.vscode/launch.json
vendored
17
.vscode/launch.json
vendored
@ -5,12 +5,25 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "gate",
|
"name": "gate_1",
|
||||||
"type": "go",
|
"type": "go",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mode": "debug",
|
"mode": "debug",
|
||||||
"program": "${workspaceFolder}/services/gate", //配置Go项目启动文件路径,即main函数所在的.go文件的路径,${workspaceRoot}代表项目的根目录,也就是 /bin /pkg /src这三个文件夹所在的目录
|
"program": "${workspaceFolder}/services/gate", //配置Go项目启动文件路径,即main函数所在的.go文件的路径,${workspaceRoot}代表项目的根目录,也就是 /bin /pkg /src这三个文件夹所在的目录
|
||||||
"args": ["-conf","./conf/gate.yaml"],
|
"args": ["-conf","./conf/gate_1.yaml"],
|
||||||
|
"cwd": "${workspaceFolder}/bin", //设置工作目录
|
||||||
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
|
"output": "${workspaceFolder}/bin/vsdebug_gate", //设置vscode调试时生成文件的路径
|
||||||
|
"showGlobalVariables": true,
|
||||||
|
"env": {}, //可以用来配置调试启动时所用的环境变量参数,比如gopath临时设置为某个参数就可以在这里指定,如果有多个gopath,用英文冒号:来连接多个gopath
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gate_2",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "debug",
|
||||||
|
"program": "${workspaceFolder}/services/gate", //配置Go项目启动文件路径,即main函数所在的.go文件的路径,${workspaceRoot}代表项目的根目录,也就是 /bin /pkg /src这三个文件夹所在的目录
|
||||||
|
"args": ["-conf","./conf/gate_2.yaml"],
|
||||||
"cwd": "${workspaceFolder}/bin", //设置工作目录
|
"cwd": "${workspaceFolder}/bin", //设置工作目录
|
||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"output": "${workspaceFolder}/bin/vsdebug_gate", //设置vscode调试时生成文件的路径
|
"output": "${workspaceFolder}/bin/vsdebug_gate", //设置vscode调试时生成文件的路径
|
||||||
|
22
bin/conf/gate_2.yaml
Normal file
22
bin/conf/gate_2.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
id : "gate_1" #服务的唯一id 在集群服务下不能重复即可 建议配置文件名与服务id一致
|
||||||
|
ip : "172.0.0.1" #运行主机Ip 集群通信中 按ip节点通行的查询字段 此字段可以注释掉 注释后取当前运行主机公网ip地址
|
||||||
|
tag : "demo" #服务集群标签 相同标签 且sys.registry 和 sys.rpc 配置一致 即可互相发现和通信
|
||||||
|
type : "console" #服务类型 相同服务类型相同 如 多个login 服务 相同服务多开 服务类型一致
|
||||||
|
category : "BusinessService" #服务类别 例如 网关服务器 或者 游戏服务器 以及普通业务服务器
|
||||||
|
version : 1.0 #服务版本 多服务器相同的服务类型 高版本比低版本拥有更高的访问优先级 使用场景 热更新机制
|
||||||
|
|
||||||
|
#系统配置
|
||||||
|
sys:
|
||||||
|
log:
|
||||||
|
FileName: "./log/gate_1.log" #日志文件存放地址
|
||||||
|
Loglevel: 0 #日志文件输出级别
|
||||||
|
LogMaxSize: 128 #日志文件最大Size
|
||||||
|
LogMaxAge: 7 #日志文件最多保留天数
|
||||||
|
cache:
|
||||||
|
Redis_Addr: ["10.0.0.9:9001","10.0.0.9:9002","10.0.0.9:9003","10.0.1.45:9004","10.0.1.45:9005","10.0.1.45:9006"]
|
||||||
|
Redis_Password: ""
|
||||||
|
|
||||||
|
#模块配置
|
||||||
|
modules:
|
||||||
|
SM_GateModule:
|
||||||
|
WSAddr: ":7891"
|
@ -1,7 +1,7 @@
|
|||||||
2022/05/30 10:33:39.990 info single/service.go:44 init sys.log success!
|
2022/05/30 10:36:15.600 info single/service.go:44 init sys.log success!
|
||||||
2022/05/30 10:33:40.007 info single/service.go:49 init sys.event success!
|
2022/05/30 10:36:15.617 info single/service.go:49 init sys.event success!
|
||||||
2022/05/30 10:33:42.708 info services/servicebase.go:20 init sys.cache success!
|
2022/05/30 10:36:15.622 info services/servicebase.go:20 init sys.cache success!
|
||||||
2022/05/30 10:33:42.708 info cbase/servicebase.go:58 服务[gate_1] 初始化完成!
|
2022/05/30 10:36:15.622 info cbase/servicebase.go:58 服务[gate_1] 初始化完成!
|
||||||
2022/05/30 10:33:42.708 info cbase/servicebase.go:80 服务[gate_1:1.0.0.0] 启动完成!
|
2022/05/30 10:36:15.622 info cbase/servicebase.go:80 服务[gate_1:1.0.0.0] 启动完成!
|
||||||
2022/05/30 10:33:42.708 debug gate/module.go:32 Module.Gate Init
|
2022/05/30 10:36:15.622 debug gate/module.go:32 Module.Gate Init
|
||||||
2022/05/30 10:33:42.708 debug gate/module.go:38 Module.Gate Start
|
2022/05/30 10:36:15.622 debug gate/module.go:38 Module.Gate Start
|
||||||
|
Loading…
Reference in New Issue
Block a user