feat grpc客户端整理
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package service
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package service
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package service
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package service
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.hlsq.asia/mmorpg/service-common/discover"
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package stream_client
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -30,7 +29,7 @@ func findGatewayBySID(sid string, fun GatewayFun) (*gatewayStream, error) {
|
|||||||
return v.(*gatewayStream), nil
|
return v.(*gatewayStream), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
client, err := service.GatewayNewClient(sid)
|
client, err := GatewayNewClient(sid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("findGatewayBySID cannot find client: %v", err)
|
log.Errorf("findGatewayBySID cannot find client: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package stream_client
|
package grpc_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.hlsq.asia/mmorpg/service-common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -30,7 +29,7 @@ func findSceneBySID(sid string, fun SceneFun) (*sceneStream, error) {
|
|||||||
return v.(*sceneStream), nil
|
return v.(*sceneStream), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
client, err := service.SceneNewClient(sid)
|
client, err := SceneNewClient(sid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("findSceneBySID cannot find client: %v", err)
|
log.Errorf("findSceneBySID cannot find client: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
Reference in New Issue
Block a user