-
Notifications
You must be signed in to change notification settings - Fork 0
lele11/SerivceGo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
1. 游戏启动需要consul 服务发现做服务器管理 1.1 在consul中配置游戏的业务配置 通过配置文件,执行脚本,生产配置文件 1.2 使用KV作为通用配置管理 在consul的图形界面,可以通过 Key/Value 页签,对consul的k/v进行管理 此处,使用k/v管理游戏的通过配置,支持json 和yaml 格式的内容 如: /hangGame/common (该名称应和业务代码中保持一致) 内容: ---------------------------------------------- redis: #redis配置 host: 127.0.0.1:6379 #redis地址 password: #redis密码 logLevel: debug #日志等级 logPath: ../log/ #日志的路径 remoteLog: #远程日志记录服务 ---------------------------------------------- 2. 游戏的编译和启动 2.1 编译 使用 build.py 进行项目编译,参数指定 编译的服务器版本类型(linux/windows),编译结果的输出目录 命令: python build.py -v=linux -o=../output 此脚本的功能包括: 代码编译,配置文件拷贝工作,执行后 在输出目录得到可以发布的文件 后续可以加上打包等操作 2.2 启动 在编译结果目录 如: ../output/bin 目录 执行 python start.py 可以在本文件中,修改使用的consul服务地址 脚本逻辑:通过consul获取本机上的注册服务,启动未启动的服务
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published