feat 历史记录

This commit is contained in:
2026-01-14 18:15:38 +08:00
parent 6bd120ef54
commit 30d2c589bf
6 changed files with 7 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ package app
import ( import (
"git.hlsq.asia/mmorpg/service-common/net/grpc/service" "git.hlsq.asia/mmorpg/service-common/net/grpc/service"
"git.hlsq.asia/mmorpg/service-scene/config" "git.hlsq.asia/mmorpg/service-scene/config"
"git.hlsq.asia/mmorpg/service-scene/internal/grpc_server/server" "git.hlsq.asia/mmorpg/service-scene/internal/grpc_server"
) )
// ModuleGrpcServer Grpc服务模块 // ModuleGrpcServer Grpc服务模块
@@ -16,7 +16,7 @@ func (m *ModuleGrpcServer) init() error {
} }
func (m *ModuleGrpcServer) start() error { func (m *ModuleGrpcServer) start() error {
m.server = server.NewServer(config.Get().Serve.Grpc.TTL) m.server = grpc_server.NewServer(config.Get().Serve.Grpc.TTL)
m.server.Init(config.Get().Serve.Grpc.Address, config.Get().Serve.Grpc.Port) m.server.Init(config.Get().Serve.Grpc.Address, config.Get().Serve.Grpc.Port)
return nil return nil
} }

2
go.mod
View File

@@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-scene
go 1.23.1 go 1.23.1
require ( require (
git.hlsq.asia/mmorpg/service-common v0.0.0-20260113095415-34b2e45e3d50 git.hlsq.asia/mmorpg/service-common v0.0.0-20260114100922-695f5e7b0497
github.com/judwhite/go-svc v1.2.1 github.com/judwhite/go-svc v1.2.1
go.uber.org/zap v1.27.0 go.uber.org/zap v1.27.0
google.golang.org/grpc v1.71.1 google.golang.org/grpc v1.71.1

2
go.sum
View File

@@ -1,7 +1,5 @@
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260113095415-34b2e45e3d50 h1:T0JZl2N+HMYRgyifEGFXD2y1MZOuoAS1xjnIg/JLGwM=
git.hlsq.asia/mmorpg/service-common v0.0.0-20260113095415-34b2e45e3d50/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=

View File

@@ -1,4 +1,4 @@
package server package grpc_server
import ( import (
"context" "context"

View File

@@ -1,4 +1,4 @@
package server package grpc_server
import ( import (
"git.hlsq.asia/mmorpg/service-common/discover/common" "git.hlsq.asia/mmorpg/service-common/discover/common"

View File

@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"git.hlsq.asia/mmorpg/service-common/discover" "git.hlsq.asia/mmorpg/service-common/discover"
"git.hlsq.asia/mmorpg/service-common/log" "git.hlsq.asia/mmorpg/service-common/log"
"git.hlsq.asia/mmorpg/service-common/net/grpc/stream_client" "git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_client"
"git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb" "git.hlsq.asia/mmorpg/service-common/proto/rs/grpc_pb"
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb" "git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
"git.hlsq.asia/mmorpg/service-common/utils" "git.hlsq.asia/mmorpg/service-common/utils"
@@ -120,7 +120,7 @@ func (i *Instance) onLogic(delta int64) {
payload, _ := proto.Marshal(&ss_pb.S2C_Position{ payload, _ := proto.Marshal(&ss_pb.S2C_Position{
Info: positionUpdate, Info: positionUpdate,
}) })
if err := stream_client.SendMessageToGateway(sid, stream_client.FunToClient, &grpc_pb.ToClientReq{ if err := grpc_client.SendMessageToGateway(sid, grpc_client.FunToClient, &grpc_pb.ToClientReq{
USN: "", USN: "",
MessageID: int32(ss_pb.MessageID_MESSAGE_ID_POSITION), MessageID: int32(ss_pb.MessageID_MESSAGE_ID_POSITION),
Payload: payload, Payload: payload,