feat 包命名规范
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user