feat 包命名规范

This commit is contained in:
2026-02-11 14:48:21 +08:00
parent 0ca8a0ccbb
commit 558677bc3a
30 changed files with 162 additions and 123 deletions

View File

@@ -5,7 +5,7 @@ import (
"git.hlsq.asia/mmorpg/service-common/db/etcd"
"git.hlsq.asia/mmorpg/service-common/discover/common"
"git.hlsq.asia/mmorpg/service-common/log"
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpc_conn"
"git.hlsq.asia/mmorpg/service-common/net/grpc/grpcconn"
clientv3 "go.etcd.io/etcd/client/v3"
"google.golang.org/grpc"
"sync"
@@ -14,7 +14,7 @@ import (
// 大量读少量写的情况下,读写锁比同步Map更高效
var (
serverMU = sync.RWMutex{}
conn = make(map[string]*grpc_conn.GrpcConnectionMgr)
conn = make(map[string]*grpcconn.GrpcConnectionMgr)
serverLeaseM = make(map[int64]clientv3.LeaseID)
)
@@ -79,7 +79,7 @@ func onServerStart(data any) {
if v, ok := conn[provider.Target]; ok {
v.Store(provider.SID, provider.Addr)
} else {
mgr := grpc_conn.NewGrpcConnectionMgr()
mgr := grpcconn.NewGrpcConnectionMgr()
mgr.Store(provider.SID, provider.Addr)
conn[provider.Target] = mgr
}