GoGameServer:Go(golang)中的游戏服务器

上传者: 42099942 | 上传时间: 2022-04-14 18:30:52 | 文件大小: 233KB | 文件类型: ZIP
Go
GoGameServer 使用go搭建的一个游戏服务器项目 1:consul作为服务注册/发现中心,便于服务的动态扩容 2:与客户端的通信协议使用protobuf 3:服务之间支持基于TCP的ipc,rpc通信 4:缓存使用redis 5:数据库支持mysql、mongodb 结构图 启动说明 启动consul 启动mysql(config/local/mysql.json) 启动redis(config/local/redis.json) 执行sh run.sh启动服务器 执行sh stop.sh停止服务器 执行sh test.sh启动测试服务器 执行sh proto.sh生成proto文件

文件下载

资源详情

[{"title":"( 95 个子文件 233KB ) GoGameServer:Go(golang)中的游戏服务器","children":[{"title":"GoGameServer-master","children":[{"title":".gitignore <span style='color:#111;'> 94B </span>","children":null,"spread":false},{"title":"go.mod <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"stop.sh <span style='color:#111;'> 315B </span>","children":null,"spread":false},{"title":"core","children":[{"title":"libs","children":[{"title":"stack","children":[{"title":"stack.go <span style='color:#111;'> 595B </span>","children":null,"spread":false}],"spread":true},{"title":"websocket","children":[{"title":"websocket.go <span style='color:#111;'> 2.38KB </span>","children":null,"spread":false}],"spread":true},{"title":"hash","children":[{"title":"murmurHash.go <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"md5.go <span style='color:#111;'> 234B </span>","children":null,"spread":false}],"spread":true},{"title":"array","children":[{"title":"array.go <span style='color:#111;'> 441B </span>","children":null,"spread":false}],"spread":true},{"title":"jwt","children":[{"title":"jwt.go <span style='color:#111;'> 833B </span>","children":null,"spread":false}],"spread":true},{"title":"redis","children":[{"title":"client.go <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false}],"spread":true},{"title":"grpc","children":[{"title":"ipc","children":[{"title":"server.go <span style='color:#111;'> 3.11KB </span>","children":null,"spread":false},{"title":"ipc.proto <span style='color:#111;'> 261B </span>","children":null,"spread":false},{"title":"ipc.pb.go <span style='color:#111;'> 5.85KB </span>","children":null,"spread":false},{"title":"client.go <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"server.go <span style='color:#111;'> 598B </span>","children":null,"spread":false},{"title":"client.go <span style='color:#111;'> 4.11KB </span>","children":null,"spread":false}],"spread":true},{"title":"system","children":[{"title":"system.go <span style='color:#111;'> 535B </span>","children":null,"spread":false}],"spread":true},{"title":"dict","children":[{"title":"dict.go <span style='color:#111;'> 3.03KB </span>","children":null,"spread":false}],"spread":false},{"title":"mysql","children":[{"title":"client.go <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"mongo","children":[{"title":"client.go <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false}],"spread":false},{"title":"common","children":[{"title":"common.go <span style='color:#111;'> 1.94KB </span>","children":null,"spread":false}],"spread":false},{"title":"sessions","children":[{"title":"session.go <span style='color:#111;'> 198B </span>","children":null,"spread":false},{"title":"backSessionService.go <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"frontCodec.go <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"frontSessionService.go <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"frontSession.go <span style='color:#111;'> 3.76KB </span>","children":null,"spread":false},{"title":"backSession.go <span style='color:#111;'> 3.38KB </span>","children":null,"spread":false}],"spread":false},{"title":"rpc","children":[{"title":"server.go <span style='color:#111;'> 660B </span>","children":null,"spread":false},{"title":"client.go <span style='color:#111;'> 3.91KB </span>","children":null,"spread":false}],"spread":false},{"title":"logger","children":[{"title":"logger.go <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false}],"spread":false},{"title":"timer","children":[{"title":"timer.go <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false}],"spread":false},{"title":"export.go <span style='color:#111;'> 707B </span>","children":null,"spread":false},{"title":"guid","children":[{"title":"guid.go <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false}],"spread":false},{"title":"consul","children":[{"title":"kv.go <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"server.go <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":"client.go <span style='color:#111;'> 2.45KB </span>","children":null,"spread":false}],"spread":false},{"title":"random","children":[{"title":"random.go <span style='color:#111;'> 611B </span>","children":null,"spread":false}],"spread":false},{"title":"request","children":[{"title":"request.go <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"service","children":[{"title":"service.go <span style='color:#111;'> 9.02KB </span>","children":null,"spread":false}],"spread":true},{"title":"config","children":[{"title":"config.go <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"protos","children":[{"title":"gameProto","children":[{"title":"gameProto.go <span style='color:#111;'> 785B </span>","children":null,"spread":false},{"title":"gameProtoMsgId.go <span style='color:#111;'> 385B </span>","children":null,"spread":false},{"title":"gameProto.pb.go <span style='color:#111;'> 10.97KB </span>","children":null,"spread":false},{"title":"gameProto.proto <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":true},{"title":"common.go <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false}],"spread":true},{"title":"messages","children":[{"title":"frontMessageHandle.go <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false},{"title":"ipcServerMessageHandle.go <span style='color:#111;'> 502B </span>","children":null,"spread":false},{"title":"ipcServerMessage.go <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"frontMessage.go <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"ipcClientMessage.go <span style='color:#111;'> 714B </span>","children":null,"spread":false}],"spread":true},{"title":"consts","children":[{"title":"errCode","children":[{"title":"errCode.go <span style='color:#111;'> 82B </span>","children":null,"spread":false}],"spread":true},{"title":"serviceType","children":[{"title":"serviceType.go <span style='color:#111;'> 87B </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"service.go <span style='color:#111;'> 171B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"global.go <span style='color:#111;'> 619B </span>","children":null,"spread":false}],"spread":true},{"title":"test.sh <span style='color:#111;'> 80B </span>","children":null,"spread":false},{"title":"proto.sh <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"GoGameServer.png <span style='color:#111;'> 150.79KB </span>","children":null,"spread":false},{"title":"readme <span style='color:#111;'> 127B </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 30.36KB </span>","children":null,"spread":false},{"title":"dbs","children":[{"title":"user.sql <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 631B </span>","children":null,"spread":false},{"title":"run.sh <span style='color:#111;'> 459B </span>","children":null,"spread":false},{"title":"config","children":[{"title":"local","children":[{"title":"mongo.json <span style='color:#111;'> 129B </span>","children":null,"spread":false},{"title":"service.json <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"redis.json <span style='color:#111;'> 240B </span>","children":null,"spread":false},{"title":"mysql.json <span style='color:#111;'> 469B </span>","children":null,"spread":false},{"title":"log.json <span style='color:#111;'> 44B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"servives","children":[{"title":"api","children":[{"title":"main.go <span style='color:#111;'> 474B </span>","children":null,"spread":false},{"title":"controllers","children":[{"title":"default.go <span style='color:#111;'> 973B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"login","children":[{"title":"model","children":[{"title":"onlineUser.go <span style='color:#111;'> 147B </span>","children":null,"spread":false}],"spread":false},{"title":"module","children":[{"title":"login.go <span style='color:#111;'> 2.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"main.go <span style='color:#111;'> 791B </span>","children":null,"spread":false},{"title":"cache","children":[{"title":"online.go <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"log","children":[{"title":"main.go <span style='color:#111;'> 313B </span>","children":null,"spread":false}],"spread":false},{"title":"chat","children":[{"title":"model","children":[{"title":"chatUser.go <span style='color:#111;'> 148B </span>","children":null,"spread":false}],"spread":false},{"title":"module","children":[{"title":"chat.go <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false}],"spread":false},{"title":"main.go <span style='color:#111;'> 845B </span>","children":null,"spread":false},{"title":"cache","children":[{"title":"online.go <span style='color:#111;'> 953B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"public","children":[{"title":"mongoModels","children":[{"title":"user.go <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false}],"spread":false},{"title":"mysqlInstances","children":[{"title":"mysqlInstance.go <span style='color:#111;'> 315B </span>","children":null,"spread":false}],"spread":false},{"title":"redisInstances","children":[{"title":"redisInstance.go <span style='color:#111;'> 242B </span>","children":null,"spread":false}],"spread":false},{"title":"rpcModules","children":[{"title":"client.go <span style='color:#111;'> 466B </span>","children":null,"spread":false}],"spread":false},{"title":"mysqlModels","children":[{"title":"user.go <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":false},{"title":"redisKeys","children":[{"title":"redisKey.go <span style='color:#111;'> 82B </span>","children":null,"spread":false}],"spread":false},{"title":"mongoInstances","children":[{"title":"mongoInstance.go <span style='color:#111;'> 167B </span>","children":null,"spread":false}],"spread":false},{"title":"token.go <span style='color:#111;'> 897B </span>","children":null,"spread":false},{"title":"redisCaches","children":[{"title":"user.go <span style='color:#111;'> 748B </span>","children":null,"spread":false}],"spread":false},{"title":"errCodes","children":[{"title":"errCode.go <span style='color:#111;'> 60B </span>","children":null,"spread":false}],"spread":false},{"title":"common.go <span style='color:#111;'> 893B </span>","children":null,"spread":false}],"spread":false},{"title":"game","children":[{"title":"module","children":[{"title":"user.go <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"main.go <span style='color:#111;'> 793B </span>","children":null,"spread":false}],"spread":false},{"title":"connector","children":[{"title":"module","children":[{"title":"server.go <span style='color:#111;'> 595B </span>","children":null,"spread":false}],"spread":false},{"title":"main.go <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"cache","children":[{"title":"serverCache.go <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"test","children":[{"title":"main.go <span style='color:#111;'> 5.28KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明