Bladeren bron

v0.0.1开发:gateway服务初始化

#Suyghur 3 jaren geleden
bovenliggende
commit
3659820d3c
35 gewijzigde bestanden met toevoegingen van 1346 en 54 verwijderingen
  1. 2 2
      bff/apibff/api/desc/apibff.api
  2. 12 2
      bff/apibff/api/desc/cmd/cmd.api
  3. 0 16
      bff/apibff/api/desc/comm/comm.api
  4. 7 1
      bff/apibff/api/etc/apibff.yaml
  5. 5 1
      bff/apibff/api/internal/config/config.go
  6. 1 1
      bff/apibff/api/internal/handler/cs/cmd/cssendhandler.go
  7. 1 1
      bff/apibff/api/internal/handler/player/cmd/playersendhandler.go
  8. 1 1
      bff/apibff/api/internal/logic/cs/cmd/cssendlogic.go
  9. 1 1
      bff/apibff/api/internal/logic/player/cmd/playersendlogic.go
  10. 14 2
      bff/apibff/api/internal/logic/player/login/playerloginlogic.go
  11. 6 2
      bff/apibff/api/internal/svc/servicecontext.go
  12. 10 16
      bff/apibff/api/internal/types/types.go
  13. 6 0
      bff/rpcbff/etc/rpcbff.yaml
  14. 7 0
      bff/rpcbff/internal/config/config.go
  15. 30 0
      bff/rpcbff/internal/logic/receiverchatmsglogic.go
  16. 26 0
      bff/rpcbff/internal/server/rpcbffserver.go
  17. 13 0
      bff/rpcbff/internal/svc/servicecontext.go
  18. 219 0
      bff/rpcbff/pb/rpcbff.pb.go
  19. 4 5
      bff/rpcbff/pb/rpcbff.proto
  20. 132 0
      bff/rpcbff/pb/rpcbff_grpc.pb.go
  21. 40 0
      bff/rpcbff/rpcbff.go
  22. 37 0
      bff/rpcbff/rpcbff/rpcbff.go
  23. 6 0
      gateway/rpc/etc/gateway.yaml
  24. 40 0
      gateway/rpc/gateway.go
  25. 44 0
      gateway/rpc/gateway/gateway.go
  26. 7 0
      gateway/rpc/internal/config/config.go
  27. 30 0
      gateway/rpc/internal/logic/csloginlogic.go
  28. 34 0
      gateway/rpc/internal/logic/playerloginlogic.go
  29. 33 0
      gateway/rpc/internal/server/gatewayserver.go
  30. 13 0
      gateway/rpc/internal/svc/servicecontext.go
  31. 327 0
      gateway/rpc/pb/gateway.pb.go
  32. 27 0
      gateway/rpc/pb/gateway.proto
  33. 141 0
      gateway/rpc/pb/gateway_grpc.pb.go
  34. 37 3
      go.mod
  35. 33 0
      go.sum

+ 2 - 2
bff/apibff/api/desc/apibff.api

@@ -34,7 +34,7 @@ service apibff {
 	
 	@doc "玩家发送信息"
 	@handler playerSend
-	post /player/send (SendReq) returns (CommResp)
+	post /player/send (ChatMsgReq) returns (CommResp)
 	
 	@doc "玩家断开连接"
 	@handler playerDisconnect
@@ -71,7 +71,7 @@ service apibff {
 	
 	@doc "客服发送信息"
 	@handler csSend
-	post /cs/send (SendReq) returns (CommResp)
+	post /cs/send (ChatMsgReq) returns (CommResp)
 	
 	@doc "客服断开连接"
 	@handler csDisconnect

+ 12 - 2
bff/apibff/api/desc/cmd/cmd.api

@@ -8,6 +8,11 @@ info(
 
 
 type (
+    PlayerLoginInfo {
+        PlayerId string `json:"player_id"`
+        GameId string `json:"game_id"`
+    }
+
     PlayerConnectReq {
         CsId string `json:"cs_id"`
     }
@@ -17,6 +22,11 @@ type (
         ChatId string `json:"chat_id"`
     }
 
+    CsLoginInfo {
+        UserName string `json:"user_name"`
+        Password string `json:"password"`
+    }
+
     CsConnectReq {
         PlayerId string `json:"palyer_id"`
         GameId string `json:"game_id"`
@@ -27,9 +37,9 @@ type (
         ChatId string `json:"chat_id"`
     }
 
-    SendReq {
+    ChatMsgReq {
         ChatId string `form:"chat_id"`
-        Msg string `form:"msg"`
+        Text string `form:"msg"`
         Pic string `form:"pic,optional"`
     }
 )

+ 0 - 16
bff/apibff/api/desc/comm/comm.api

@@ -7,25 +7,9 @@ info(
 )
 
 type (
-    PlayerLoginInfo {
-        PlayerId string `json:"player_id"`
-        GameId string `json:"game_id"`
-    }
-
-    CsLoginInfo {
-        UserName string `json:"user_name"`
-        Password string `json:"password"`
-    }
-
     CommResp {
         Code int `json:"code"`
         Msg string `json:"msg"`
         Data interface{} `json:"data"`
     }
-
-    JwtToken {
-        AccessToken string `json:"access_token,omitempty"`
-        AccessExpire int64 `json:"access_expire,omitempty"`
-        RefreshAfter int64 `json:"refresh_after,omitempty"`
-    }
 )

+ 7 - 1
bff/apibff/api/etc/apibff.yaml

@@ -1,6 +1,6 @@
 Name: apibff
 Host: 0.0.0.0
-Port: 8888
+Port: 8001
 
 #Mysql:
 #  DataSource: root:kel317-+@tcp(101.33.209.36)/ylink?charset=utf8mb4&parseTime=true&loc=Asia%2FShanghai
@@ -10,6 +10,12 @@ Port: 8888
 #    Pass: $pass
 #    Type: node
 
+GatewayRpcConf:
+  Etcd:
+    Hosts:
+      - 101.33.209.36:2379
+    Key: gateway.rpc
+
 Auth:
   AccessSecret: ylink2022
   AccessExpire: 259200

+ 5 - 1
bff/apibff/api/internal/config/config.go

@@ -1,6 +1,9 @@
 package config
 
-import "github.com/zeromicro/go-zero/rest"
+import (
+	"github.com/zeromicro/go-zero/rest"
+	"github.com/zeromicro/go-zero/zrpc"
+)
 
 type Config struct {
 	rest.RestConf
@@ -8,4 +11,5 @@ type Config struct {
 		AccessSecret string
 		AccessExpire int64
 	}
+	GatewayRpcConf zrpc.RpcClientConf
 }

+ 1 - 1
bff/apibff/api/internal/handler/cs/cmd/cssendhandler.go

@@ -11,7 +11,7 @@ import (
 
 func CsSendHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
-		var req types.SendReq
+		var req types.ChatMsgReq
 		if err := httpx.Parse(r, &req); err != nil {
 			httpx.Error(w, err)
 			return

+ 1 - 1
bff/apibff/api/internal/handler/player/cmd/playersendhandler.go

@@ -11,7 +11,7 @@ import (
 
 func PlayerSendHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
 	return func(w http.ResponseWriter, r *http.Request) {
-		var req types.SendReq
+		var req types.ChatMsgReq
 		if err := httpx.Parse(r, &req); err != nil {
 			httpx.Error(w, err)
 			return

+ 1 - 1
bff/apibff/api/internal/logic/cs/cmd/cssendlogic.go

@@ -23,7 +23,7 @@ func NewCsSendLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CsSendLogi
 	}
 }
 
-func (l *CsSendLogic) CsSend(req *types.SendReq) (resp *types.CommResp, err error) {
+func (l *CsSendLogic) CsSend(req *types.ChatMsgReq) (resp *types.CommResp, err error) {
 	// todo: add your logic here and delete this line
 
 	return

+ 1 - 1
bff/apibff/api/internal/logic/player/cmd/playersendlogic.go

@@ -23,7 +23,7 @@ func NewPlayerSendLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Player
 	}
 }
 
-func (l *PlayerSendLogic) PlayerSend(req *types.SendReq) (resp *types.CommResp, err error) {
+func (l *PlayerSendLogic) PlayerSend(req *types.ChatMsgReq) (resp *types.CommResp, err error) {
 	// todo: add your logic here and delete this line
 
 	return

+ 14 - 2
bff/apibff/api/internal/logic/player/login/playerloginlogic.go

@@ -2,6 +2,7 @@ package login
 
 import (
 	"context"
+	"ylink/gateway/rpc/gateway"
 
 	"ylink/bff/apibff/api/internal/svc"
 	"ylink/bff/apibff/api/internal/types"
@@ -25,6 +26,17 @@ func NewPlayerLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Playe
 
 func (l *PlayerLoginLogic) PlayerLogin(req *types.PlayerLoginInfo) (resp *types.CommResp, err error) {
 	// todo: add your logic here and delete this line
-
-	return
+	rpcResp, err := l.svcCtx.GatewayRpc.PlayerLogin(l.ctx, &gateway.PlayerLoginReq{
+		PlayerId: req.PlayerId,
+		GameId:   req.GameId,
+	})
+	if err != nil {
+		return &types.CommResp{Code: -1, Msg: err.Error(), Data: map[string]interface{}{}}, err
+	}
+	return &types.CommResp{Code: 0, Msg: "success", Data: map[string]interface{}{
+		"access_token":  rpcResp.AccessToken,
+		"access_expire": rpcResp.AccessExpire,
+		"refreshAfter":  rpcResp.RefreshAfter,
+		"url":           rpcResp.Url,
+	}}, nil
 }

+ 6 - 2
bff/apibff/api/internal/svc/servicecontext.go

@@ -1,15 +1,19 @@
 package svc
 
 import (
+	"github.com/zeromicro/go-zero/zrpc"
 	"ylink/bff/apibff/api/internal/config"
+	"ylink/gateway/rpc/gateway"
 )
 
 type ServiceContext struct {
-	Config config.Config
+	Config     config.Config
+	GatewayRpc gateway.Gateway
 }
 
 func NewServiceContext(c config.Config) *ServiceContext {
 	return &ServiceContext{
-		Config: c,
+		Config:     c,
+		GatewayRpc: gateway.NewGateway(zrpc.MustNewClient(c.GatewayRpcConf)),
 	}
 }

+ 10 - 16
bff/apibff/api/internal/types/types.go

@@ -1,26 +1,15 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type PlayerLoginInfo struct {
-	PlayerId string `json:"player_id"`
-	GameId   string `json:"game_id"`
-}
-
-type CsLoginInfo struct {
-	UserName string `json:"user_name"`
-	Password string `json:"password"`
-}
-
 type CommResp struct {
 	Code int         `json:"code"`
 	Msg  string      `json:"msg"`
 	Data interface{} `json:"data"`
 }
 
-type JwtToken struct {
-	AccessToken  string `json:"access_token,omitempty"`
-	AccessExpire int64  `json:"access_expire,omitempty"`
-	RefreshAfter int64  `json:"refresh_after,omitempty"`
+type PlayerLoginInfo struct {
+	PlayerId string `json:"player_id"`
+	GameId   string `json:"game_id"`
 }
 
 type PlayerConnectReq struct {
@@ -32,6 +21,11 @@ type PlayerDisconnectReq struct {
 	ChatId string `json:"chat_id"`
 }
 
+type CsLoginInfo struct {
+	UserName string `json:"user_name"`
+	Password string `json:"password"`
+}
+
 type CsConnectReq struct {
 	PlayerId string `json:"palyer_id"`
 	GameId   string `json:"game_id"`
@@ -42,8 +36,8 @@ type CsDisconnectReq struct {
 	ChatId   string `json:"chat_id"`
 }
 
-type SendReq struct {
+type ChatMsgReq struct {
 	ChatId string `form:"chat_id"`
-	Msg    string `form:"msg"`
+	Text   string `form:"msg"`
 	Pic    string `form:"pic,optional"`
 }

+ 6 - 0
bff/rpcbff/etc/rpcbff.yaml

@@ -0,0 +1,6 @@
+Name: rpcbff.rpc
+ListenOn: 127.0.0.1:8080
+Etcd:
+  Hosts:
+  - 127.0.0.1:2379
+  Key: rpcbff.rpc

+ 7 - 0
bff/rpcbff/internal/config/config.go

@@ -0,0 +1,7 @@
+package config
+
+import "github.com/zeromicro/go-zero/zrpc"
+
+type Config struct {
+	zrpc.RpcServerConf
+}

+ 30 - 0
bff/rpcbff/internal/logic/receiverchatmsglogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"ylink/bff/rpcbff/internal/svc"
+	"ylink/bff/rpcbff/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type ReceiverChatMsgLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewReceiverChatMsgLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ReceiverChatMsgLogic {
+	return &ReceiverChatMsgLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *ReceiverChatMsgLogic) ReceiverChatMsg(in *pb.ChatMsgReq, stream pb.Rpcbff_ReceiverChatMsgServer) error {
+	// todo: add your logic here and delete this line
+
+	return nil
+}

+ 26 - 0
bff/rpcbff/internal/server/rpcbffserver.go

@@ -0,0 +1,26 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: rpcbff.proto
+
+package server
+
+import (
+	"ylink/bff/rpcbff/internal/logic"
+	"ylink/bff/rpcbff/internal/svc"
+	"ylink/bff/rpcbff/pb"
+)
+
+type RpcbffServer struct {
+	svcCtx *svc.ServiceContext
+	pb.UnimplementedRpcbffServer
+}
+
+func NewRpcbffServer(svcCtx *svc.ServiceContext) *RpcbffServer {
+	return &RpcbffServer{
+		svcCtx: svcCtx,
+	}
+}
+
+func (s *RpcbffServer) ReceiverChatMsg(in *pb.ChatMsgReq, stream pb.Rpcbff_ReceiverChatMsgServer) error {
+	l := logic.NewReceiverChatMsgLogic(stream.Context(), s.svcCtx)
+	return l.ReceiverChatMsg(in, stream)
+}

+ 13 - 0
bff/rpcbff/internal/svc/servicecontext.go

@@ -0,0 +1,13 @@
+package svc
+
+import "ylink/bff/rpcbff/internal/config"
+
+type ServiceContext struct {
+	Config config.Config
+}
+
+func NewServiceContext(c config.Config) *ServiceContext {
+	return &ServiceContext{
+		Config: c,
+	}
+}

+ 219 - 0
bff/rpcbff/pb/rpcbff.pb.go

@@ -0,0 +1,219 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
+// source: pb/rpcbff.proto
+
+package pb
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ChatMsgReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
+}
+
+func (x *ChatMsgReq) Reset() {
+	*x = ChatMsgReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_pb_rpcbff_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChatMsgReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChatMsgReq) ProtoMessage() {}
+
+func (x *ChatMsgReq) ProtoReflect() protoreflect.Message {
+	mi := &file_pb_rpcbff_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ChatMsgReq.ProtoReflect.Descriptor instead.
+func (*ChatMsgReq) Descriptor() ([]byte, []int) {
+	return file_pb_rpcbff_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ChatMsgReq) GetChatId() string {
+	if x != nil {
+		return x.ChatId
+	}
+	return ""
+}
+
+type ChatMsgReqResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
+	Pic  string `protobuf:"bytes,2,opt,name=pic,proto3" json:"pic,omitempty"`
+}
+
+func (x *ChatMsgReqResp) Reset() {
+	*x = ChatMsgReqResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_pb_rpcbff_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChatMsgReqResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChatMsgReqResp) ProtoMessage() {}
+
+func (x *ChatMsgReqResp) ProtoReflect() protoreflect.Message {
+	mi := &file_pb_rpcbff_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ChatMsgReqResp.ProtoReflect.Descriptor instead.
+func (*ChatMsgReqResp) Descriptor() ([]byte, []int) {
+	return file_pb_rpcbff_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ChatMsgReqResp) GetText() string {
+	if x != nil {
+		return x.Text
+	}
+	return ""
+}
+
+func (x *ChatMsgReqResp) GetPic() string {
+	if x != nil {
+		return x.Pic
+	}
+	return ""
+}
+
+var File_pb_rpcbff_proto protoreflect.FileDescriptor
+
+var file_pb_rpcbff_proto_rawDesc = []byte{
+	0x0a, 0x0f, 0x70, 0x62, 0x2f, 0x72, 0x70, 0x63, 0x62, 0x66, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x25, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67,
+	0x52, 0x65, 0x71, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x0e,
+	0x43, 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12,
+	0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65,
+	0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x03, 0x70, 0x69, 0x63, 0x32, 0x41, 0x0a, 0x06, 0x72, 0x70, 0x63, 0x62, 0x66, 0x66, 0x12, 0x37,
+	0x0a, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x73,
+	0x67, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x65,
+	0x71, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x73, 0x67, 0x52, 0x65,
+	0x71, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_pb_rpcbff_proto_rawDescOnce sync.Once
+	file_pb_rpcbff_proto_rawDescData = file_pb_rpcbff_proto_rawDesc
+)
+
+func file_pb_rpcbff_proto_rawDescGZIP() []byte {
+	file_pb_rpcbff_proto_rawDescOnce.Do(func() {
+		file_pb_rpcbff_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_rpcbff_proto_rawDescData)
+	})
+	return file_pb_rpcbff_proto_rawDescData
+}
+
+var file_pb_rpcbff_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_pb_rpcbff_proto_goTypes = []interface{}{
+	(*ChatMsgReq)(nil),     // 0: pb.ChatMsgReq
+	(*ChatMsgReqResp)(nil), // 1: pb.ChatMsgReqResp
+}
+var file_pb_rpcbff_proto_depIdxs = []int32{
+	0, // 0: pb.rpcbff.receiverChatMsg:input_type -> pb.ChatMsgReq
+	1, // 1: pb.rpcbff.receiverChatMsg:output_type -> pb.ChatMsgReqResp
+	1, // [1:2] is the sub-list for method output_type
+	0, // [0:1] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pb_rpcbff_proto_init() }
+func file_pb_rpcbff_proto_init() {
+	if File_pb_rpcbff_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_pb_rpcbff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChatMsgReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb_rpcbff_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChatMsgReqResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_pb_rpcbff_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   2,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_pb_rpcbff_proto_goTypes,
+		DependencyIndexes: file_pb_rpcbff_proto_depIdxs,
+		MessageInfos:      file_pb_rpcbff_proto_msgTypes,
+	}.Build()
+	File_pb_rpcbff_proto = out.File
+	file_pb_rpcbff_proto_rawDesc = nil
+	file_pb_rpcbff_proto_goTypes = nil
+	file_pb_rpcbff_proto_depIdxs = nil
+}

+ 4 - 5
bff/rpcbff/pb/rpcbff.proto

@@ -1,19 +1,18 @@
 syntax = "proto3";
 
-
 option go_package = "./pb";
 
 package pb;
 
-message ChatReq {
+message ChatMsgReq {
   string chat_id = 1;
 }
 
-message ChatResp {
-  string msg = 1;
+message ChatMsgReqResp {
+  string text = 1;
   string pic = 2;
 }
 
 service rpcbff {
-  rpc receiverChat(ChatReq) returns (stream ChatResp);
+  rpc receiverChatMsg(ChatMsgReq) returns (stream ChatMsgReqResp);
 }

+ 132 - 0
bff/rpcbff/pb/rpcbff_grpc.pb.go

@@ -0,0 +1,132 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
+// source: pb/rpcbff.proto
+
+package pb
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// RpcbffClient is the client API for Rpcbff service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type RpcbffClient interface {
+	ReceiverChatMsg(ctx context.Context, in *ChatMsgReq, opts ...grpc.CallOption) (Rpcbff_ReceiverChatMsgClient, error)
+}
+
+type rpcbffClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewRpcbffClient(cc grpc.ClientConnInterface) RpcbffClient {
+	return &rpcbffClient{cc}
+}
+
+func (c *rpcbffClient) ReceiverChatMsg(ctx context.Context, in *ChatMsgReq, opts ...grpc.CallOption) (Rpcbff_ReceiverChatMsgClient, error) {
+	stream, err := c.cc.NewStream(ctx, &Rpcbff_ServiceDesc.Streams[0], "/pb.rpcbff/receiverChatMsg", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &rpcbffReceiverChatMsgClient{stream}
+	if err := x.ClientStream.SendMsg(in); err != nil {
+		return nil, err
+	}
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	return x, nil
+}
+
+type Rpcbff_ReceiverChatMsgClient interface {
+	Recv() (*ChatMsgReqResp, error)
+	grpc.ClientStream
+}
+
+type rpcbffReceiverChatMsgClient struct {
+	grpc.ClientStream
+}
+
+func (x *rpcbffReceiverChatMsgClient) Recv() (*ChatMsgReqResp, error) {
+	m := new(ChatMsgReqResp)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+// RpcbffServer is the server API for Rpcbff service.
+// All implementations must embed UnimplementedRpcbffServer
+// for forward compatibility
+type RpcbffServer interface {
+	ReceiverChatMsg(*ChatMsgReq, Rpcbff_ReceiverChatMsgServer) error
+	mustEmbedUnimplementedRpcbffServer()
+}
+
+// UnimplementedRpcbffServer must be embedded to have forward compatible implementations.
+type UnimplementedRpcbffServer struct {
+}
+
+func (UnimplementedRpcbffServer) ReceiverChatMsg(*ChatMsgReq, Rpcbff_ReceiverChatMsgServer) error {
+	return status.Errorf(codes.Unimplemented, "method ReceiverChatMsg not implemented")
+}
+func (UnimplementedRpcbffServer) mustEmbedUnimplementedRpcbffServer() {}
+
+// UnsafeRpcbffServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to RpcbffServer will
+// result in compilation errors.
+type UnsafeRpcbffServer interface {
+	mustEmbedUnimplementedRpcbffServer()
+}
+
+func RegisterRpcbffServer(s grpc.ServiceRegistrar, srv RpcbffServer) {
+	s.RegisterService(&Rpcbff_ServiceDesc, srv)
+}
+
+func _Rpcbff_ReceiverChatMsg_Handler(srv interface{}, stream grpc.ServerStream) error {
+	m := new(ChatMsgReq)
+	if err := stream.RecvMsg(m); err != nil {
+		return err
+	}
+	return srv.(RpcbffServer).ReceiverChatMsg(m, &rpcbffReceiverChatMsgServer{stream})
+}
+
+type Rpcbff_ReceiverChatMsgServer interface {
+	Send(*ChatMsgReqResp) error
+	grpc.ServerStream
+}
+
+type rpcbffReceiverChatMsgServer struct {
+	grpc.ServerStream
+}
+
+func (x *rpcbffReceiverChatMsgServer) Send(m *ChatMsgReqResp) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+// Rpcbff_ServiceDesc is the grpc.ServiceDesc for Rpcbff service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Rpcbff_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "pb.rpcbff",
+	HandlerType: (*RpcbffServer)(nil),
+	Methods:     []grpc.MethodDesc{},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "receiverChatMsg",
+			Handler:       _Rpcbff_ReceiverChatMsg_Handler,
+			ServerStreams: true,
+		},
+	},
+	Metadata: "pb/rpcbff.proto",
+}

+ 40 - 0
bff/rpcbff/rpcbff.go

@@ -0,0 +1,40 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+
+	"ylink/bff/rpcbff/internal/config"
+	"ylink/bff/rpcbff/internal/server"
+	"ylink/bff/rpcbff/internal/svc"
+	"ylink/bff/rpcbff/pb"
+
+	"github.com/zeromicro/go-zero/core/conf"
+	"github.com/zeromicro/go-zero/core/service"
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/reflection"
+)
+
+var configFile = flag.String("f", "etc/rpcbff.yaml", "the config file")
+
+func main() {
+	flag.Parse()
+
+	var c config.Config
+	conf.MustLoad(*configFile, &c)
+	ctx := svc.NewServiceContext(c)
+	svr := server.NewRpcbffServer(ctx)
+
+	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+		pb.RegisterRpcbffServer(grpcServer, svr)
+
+		if c.Mode == service.DevMode || c.Mode == service.TestMode {
+			reflection.Register(grpcServer)
+		}
+	})
+	defer s.Stop()
+
+	fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
+	s.Start()
+}

+ 37 - 0
bff/rpcbff/rpcbff/rpcbff.go

@@ -0,0 +1,37 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: rpcbff.proto
+
+package rpcbff
+
+import (
+	"context"
+
+	"ylink/bff/rpcbff/pb"
+
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+type (
+	ChatMsgReq     = pb.ChatMsgReq
+	ChatMsgReqResp = pb.ChatMsgReqResp
+
+	Rpcbff interface {
+		ReceiverChatMsg(ctx context.Context, in *ChatMsgReq, opts ...grpc.CallOption) (pb.Rpcbff_ReceiverChatMsgClient, error)
+	}
+
+	defaultRpcbff struct {
+		cli zrpc.Client
+	}
+)
+
+func NewRpcbff(cli zrpc.Client) Rpcbff {
+	return &defaultRpcbff{
+		cli: cli,
+	}
+}
+
+func (m *defaultRpcbff) ReceiverChatMsg(ctx context.Context, in *ChatMsgReq, opts ...grpc.CallOption) (pb.Rpcbff_ReceiverChatMsgClient, error) {
+	client := pb.NewRpcbffClient(m.cli.Conn())
+	return client.ReceiverChatMsg(ctx, in, opts...)
+}

+ 6 - 0
gateway/rpc/etc/gateway.yaml

@@ -0,0 +1,6 @@
+Name: gateway.rpc
+ListenOn: 0.0.0.0:9001
+Etcd:
+  Hosts:
+    - 101.33.209.36:2379
+  Key: gateway.rpc

+ 40 - 0
gateway/rpc/gateway.go

@@ -0,0 +1,40 @@
+package main
+
+import (
+	"flag"
+	"fmt"
+
+	"ylink/gateway/rpc/internal/config"
+	"ylink/gateway/rpc/internal/server"
+	"ylink/gateway/rpc/internal/svc"
+	"ylink/gateway/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/conf"
+	"github.com/zeromicro/go-zero/core/service"
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/reflection"
+)
+
+var configFile = flag.String("f", "etc/gateway.yaml", "the config file")
+
+func main() {
+	flag.Parse()
+
+	var c config.Config
+	conf.MustLoad(*configFile, &c)
+	ctx := svc.NewServiceContext(c)
+	svr := server.NewGatewayServer(ctx)
+
+	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+		pb.RegisterGatewayServer(grpcServer, svr)
+
+		if c.Mode == service.DevMode || c.Mode == service.TestMode {
+			reflection.Register(grpcServer)
+		}
+	})
+	defer s.Stop()
+
+	fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
+	s.Start()
+}

+ 44 - 0
gateway/rpc/gateway/gateway.go

@@ -0,0 +1,44 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: gateway.proto
+
+package gateway
+
+import (
+	"context"
+
+	"ylink/gateway/rpc/pb"
+
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+type (
+	CsLoginReq     = pb.CsLoginReq
+	LoginResp      = pb.LoginResp
+	PlayerLoginReq = pb.PlayerLoginReq
+
+	Gateway interface {
+		PlayerLogin(ctx context.Context, in *PlayerLoginReq, opts ...grpc.CallOption) (*LoginResp, error)
+		CsLogin(ctx context.Context, in *CsLoginReq, opts ...grpc.CallOption) (*LoginResp, error)
+	}
+
+	defaultGateway struct {
+		cli zrpc.Client
+	}
+)
+
+func NewGateway(cli zrpc.Client) Gateway {
+	return &defaultGateway{
+		cli: cli,
+	}
+}
+
+func (m *defaultGateway) PlayerLogin(ctx context.Context, in *PlayerLoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
+	client := pb.NewGatewayClient(m.cli.Conn())
+	return client.PlayerLogin(ctx, in, opts...)
+}
+
+func (m *defaultGateway) CsLogin(ctx context.Context, in *CsLoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
+	client := pb.NewGatewayClient(m.cli.Conn())
+	return client.CsLogin(ctx, in, opts...)
+}

+ 7 - 0
gateway/rpc/internal/config/config.go

@@ -0,0 +1,7 @@
+package config
+
+import "github.com/zeromicro/go-zero/zrpc"
+
+type Config struct {
+	zrpc.RpcServerConf
+}

+ 30 - 0
gateway/rpc/internal/logic/csloginlogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"ylink/gateway/rpc/internal/svc"
+	"ylink/gateway/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type CsLoginLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCsLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CsLoginLogic {
+	return &CsLoginLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *CsLoginLogic) CsLogin(in *pb.CsLoginReq) (*pb.LoginResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &pb.LoginResp{}, nil
+}

+ 34 - 0
gateway/rpc/internal/logic/playerloginlogic.go

@@ -0,0 +1,34 @@
+package logic
+
+import (
+	"context"
+
+	"ylink/gateway/rpc/internal/svc"
+	"ylink/gateway/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type PlayerLoginLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewPlayerLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PlayerLoginLogic {
+	return &PlayerLoginLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *PlayerLoginLogic) PlayerLogin(in *pb.PlayerLoginReq) (*pb.LoginResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &pb.LoginResp{
+		AccessToken:  "test_token",
+		AccessExpire: 100,
+		RefreshAfter: 100,
+		Url:          "www.baidu.com"}, nil
+}

+ 33 - 0
gateway/rpc/internal/server/gatewayserver.go

@@ -0,0 +1,33 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: gateway.proto
+
+package server
+
+import (
+	"context"
+
+	"ylink/gateway/rpc/internal/logic"
+	"ylink/gateway/rpc/internal/svc"
+	"ylink/gateway/rpc/pb"
+)
+
+type GatewayServer struct {
+	svcCtx *svc.ServiceContext
+	pb.UnimplementedGatewayServer
+}
+
+func NewGatewayServer(svcCtx *svc.ServiceContext) *GatewayServer {
+	return &GatewayServer{
+		svcCtx: svcCtx,
+	}
+}
+
+func (s *GatewayServer) PlayerLogin(ctx context.Context, in *pb.PlayerLoginReq) (*pb.LoginResp, error) {
+	l := logic.NewPlayerLoginLogic(ctx, s.svcCtx)
+	return l.PlayerLogin(in)
+}
+
+func (s *GatewayServer) CsLogin(ctx context.Context, in *pb.CsLoginReq) (*pb.LoginResp, error) {
+	l := logic.NewCsLoginLogic(ctx, s.svcCtx)
+	return l.CsLogin(in)
+}

+ 13 - 0
gateway/rpc/internal/svc/servicecontext.go

@@ -0,0 +1,13 @@
+package svc
+
+import "ylink/gateway/rpc/internal/config"
+
+type ServiceContext struct {
+	Config config.Config
+}
+
+func NewServiceContext(c config.Config) *ServiceContext {
+	return &ServiceContext{
+		Config: c,
+	}
+}

+ 327 - 0
gateway/rpc/pb/gateway.pb.go

@@ -0,0 +1,327 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
+// source: pb/gateway.proto
+
+package pb
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PlayerLoginReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
+	GameId   string `protobuf:"bytes,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
+}
+
+func (x *PlayerLoginReq) Reset() {
+	*x = PlayerLoginReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_pb_gateway_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PlayerLoginReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PlayerLoginReq) ProtoMessage() {}
+
+func (x *PlayerLoginReq) ProtoReflect() protoreflect.Message {
+	mi := &file_pb_gateway_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PlayerLoginReq.ProtoReflect.Descriptor instead.
+func (*PlayerLoginReq) Descriptor() ([]byte, []int) {
+	return file_pb_gateway_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PlayerLoginReq) GetPlayerId() string {
+	if x != nil {
+		return x.PlayerId
+	}
+	return ""
+}
+
+func (x *PlayerLoginReq) GetGameId() string {
+	if x != nil {
+		return x.GameId
+	}
+	return ""
+}
+
+type CsLoginReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
+	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
+}
+
+func (x *CsLoginReq) Reset() {
+	*x = CsLoginReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_pb_gateway_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CsLoginReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CsLoginReq) ProtoMessage() {}
+
+func (x *CsLoginReq) ProtoReflect() protoreflect.Message {
+	mi := &file_pb_gateway_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CsLoginReq.ProtoReflect.Descriptor instead.
+func (*CsLoginReq) Descriptor() ([]byte, []int) {
+	return file_pb_gateway_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CsLoginReq) GetUserName() string {
+	if x != nil {
+		return x.UserName
+	}
+	return ""
+}
+
+func (x *CsLoginReq) GetPassword() string {
+	if x != nil {
+		return x.Password
+	}
+	return ""
+}
+
+type LoginResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	AccessToken  string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
+	AccessExpire int64  `protobuf:"varint,2,opt,name=access_expire,json=accessExpire,proto3" json:"access_expire,omitempty"`
+	RefreshAfter int64  `protobuf:"varint,3,opt,name=refresh_after,json=refreshAfter,proto3" json:"refresh_after,omitempty"`
+	Url          string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (x *LoginResp) Reset() {
+	*x = LoginResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_pb_gateway_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *LoginResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LoginResp) ProtoMessage() {}
+
+func (x *LoginResp) ProtoReflect() protoreflect.Message {
+	mi := &file_pb_gateway_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.
+func (*LoginResp) Descriptor() ([]byte, []int) {
+	return file_pb_gateway_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *LoginResp) GetAccessToken() string {
+	if x != nil {
+		return x.AccessToken
+	}
+	return ""
+}
+
+func (x *LoginResp) GetAccessExpire() int64 {
+	if x != nil {
+		return x.AccessExpire
+	}
+	return 0
+}
+
+func (x *LoginResp) GetRefreshAfter() int64 {
+	if x != nil {
+		return x.RefreshAfter
+	}
+	return 0
+}
+
+func (x *LoginResp) GetUrl() string {
+	if x != nil {
+		return x.Url
+	}
+	return ""
+}
+
+var File_pb_gateway_proto protoreflect.FileDescriptor
+
+var file_pb_gateway_proto_rawDesc = []byte{
+	0x0a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x46, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
+	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79,
+	0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61,
+	0x79, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x45,
+	0x0a, 0x0a, 0x43, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09,
+	0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73,
+	0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73,
+	0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f,
+	0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73,
+	0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
+	0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61,
+	0x63, 0x63, 0x65, 0x73, 0x73, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72,
+	0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x41, 0x66, 0x74, 0x65, 0x72,
+	0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
+	0x72, 0x6c, 0x32, 0x65, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x30, 0x0a,
+	0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x2e, 0x70,
+	0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,
+	0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x28, 0x0a, 0x07, 0x63, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
+	0x43, 0x73, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e,
+	0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
+	0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_pb_gateway_proto_rawDescOnce sync.Once
+	file_pb_gateway_proto_rawDescData = file_pb_gateway_proto_rawDesc
+)
+
+func file_pb_gateway_proto_rawDescGZIP() []byte {
+	file_pb_gateway_proto_rawDescOnce.Do(func() {
+		file_pb_gateway_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_gateway_proto_rawDescData)
+	})
+	return file_pb_gateway_proto_rawDescData
+}
+
+var file_pb_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_pb_gateway_proto_goTypes = []interface{}{
+	(*PlayerLoginReq)(nil), // 0: pb.PlayerLoginReq
+	(*CsLoginReq)(nil),     // 1: pb.CsLoginReq
+	(*LoginResp)(nil),      // 2: pb.LoginResp
+}
+var file_pb_gateway_proto_depIdxs = []int32{
+	0, // 0: pb.gateway.playerLogin:input_type -> pb.PlayerLoginReq
+	1, // 1: pb.gateway.csLogin:input_type -> pb.CsLoginReq
+	2, // 2: pb.gateway.playerLogin:output_type -> pb.LoginResp
+	2, // 3: pb.gateway.csLogin:output_type -> pb.LoginResp
+	2, // [2:4] is the sub-list for method output_type
+	0, // [0:2] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_pb_gateway_proto_init() }
+func file_pb_gateway_proto_init() {
+	if File_pb_gateway_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_pb_gateway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PlayerLoginReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb_gateway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CsLoginReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb_gateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*LoginResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_pb_gateway_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   3,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_pb_gateway_proto_goTypes,
+		DependencyIndexes: file_pb_gateway_proto_depIdxs,
+		MessageInfos:      file_pb_gateway_proto_msgTypes,
+	}.Build()
+	File_pb_gateway_proto = out.File
+	file_pb_gateway_proto_rawDesc = nil
+	file_pb_gateway_proto_goTypes = nil
+	file_pb_gateway_proto_depIdxs = nil
+}

+ 27 - 0
gateway/rpc/pb/gateway.proto

@@ -0,0 +1,27 @@
+syntax = "proto3";
+
+option go_package = "./pb";
+
+package pb;
+
+message PlayerLoginReq {
+  string player_id = 1;
+  string game_id = 2;
+}
+
+message CsLoginReq{
+  string user_name = 1;
+  string password = 2;
+}
+
+message LoginResp {
+  string access_token = 1;
+  int64  access_expire = 2;
+  int64  refresh_after = 3;
+  string  url = 4;
+}
+
+service gateway {
+  rpc playerLogin (PlayerLoginReq)returns(LoginResp);
+  rpc csLogin (CsLoginReq)returns(LoginResp);
+}

+ 141 - 0
gateway/rpc/pb/gateway_grpc.pb.go

@@ -0,0 +1,141 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
+// source: pb/gateway.proto
+
+package pb
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// GatewayClient is the client API for Gateway service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type GatewayClient interface {
+	PlayerLogin(ctx context.Context, in *PlayerLoginReq, opts ...grpc.CallOption) (*LoginResp, error)
+	CsLogin(ctx context.Context, in *CsLoginReq, opts ...grpc.CallOption) (*LoginResp, error)
+}
+
+type gatewayClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient {
+	return &gatewayClient{cc}
+}
+
+func (c *gatewayClient) PlayerLogin(ctx context.Context, in *PlayerLoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
+	out := new(LoginResp)
+	err := c.cc.Invoke(ctx, "/pb.gateway/playerLogin", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *gatewayClient) CsLogin(ctx context.Context, in *CsLoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
+	out := new(LoginResp)
+	err := c.cc.Invoke(ctx, "/pb.gateway/csLogin", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// GatewayServer is the server API for Gateway service.
+// All implementations must embed UnimplementedGatewayServer
+// for forward compatibility
+type GatewayServer interface {
+	PlayerLogin(context.Context, *PlayerLoginReq) (*LoginResp, error)
+	CsLogin(context.Context, *CsLoginReq) (*LoginResp, error)
+	mustEmbedUnimplementedGatewayServer()
+}
+
+// UnimplementedGatewayServer must be embedded to have forward compatible implementations.
+type UnimplementedGatewayServer struct {
+}
+
+func (UnimplementedGatewayServer) PlayerLogin(context.Context, *PlayerLoginReq) (*LoginResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method PlayerLogin not implemented")
+}
+func (UnimplementedGatewayServer) CsLogin(context.Context, *CsLoginReq) (*LoginResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CsLogin not implemented")
+}
+func (UnimplementedGatewayServer) mustEmbedUnimplementedGatewayServer() {}
+
+// UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to GatewayServer will
+// result in compilation errors.
+type UnsafeGatewayServer interface {
+	mustEmbedUnimplementedGatewayServer()
+}
+
+func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer) {
+	s.RegisterService(&Gateway_ServiceDesc, srv)
+}
+
+func _Gateway_PlayerLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PlayerLoginReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GatewayServer).PlayerLogin(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/pb.gateway/playerLogin",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GatewayServer).PlayerLogin(ctx, req.(*PlayerLoginReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Gateway_CsLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(CsLoginReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(GatewayServer).CsLogin(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/pb.gateway/csLogin",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(GatewayServer).CsLogin(ctx, req.(*CsLoginReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Gateway_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "pb.gateway",
+	HandlerType: (*GatewayServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "playerLogin",
+			Handler:    _Gateway_PlayerLogin_Handler,
+		},
+		{
+			MethodName: "csLogin",
+			Handler:    _Gateway_CsLogin_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "pb/gateway.proto",
+}

+ 37 - 3
go.mod

@@ -3,35 +3,69 @@ module ylink
 go 1.17
 
 require (
-	github.com/golang-jwt/jwt/v4 v4.2.0
 	github.com/zeromicro/go-zero v1.3.1
+	google.golang.org/grpc v1.44.0
+	google.golang.org/protobuf v1.27.1
 )
 
 require (
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cespare/xxhash/v2 v2.1.2 // indirect
+	github.com/coreos/go-semver v0.3.0 // indirect
+	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
+	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
 	github.com/go-logr/logr v1.2.2 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-redis/redis/v8 v8.11.4 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
+	github.com/golang/mock v1.6.0 // indirect
 	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/google/go-cmp v0.5.6 // indirect
+	github.com/google/gofuzz v1.1.0 // indirect
 	github.com/google/uuid v1.3.0 // indirect
+	github.com/googleapis/gnostic v0.4.1 // indirect
+	github.com/hashicorp/golang-lru v0.5.1 // indirect
+	github.com/json-iterator/go v1.1.11 // indirect
 	github.com/justinas/alice v1.2.0 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
+	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+	github.com/modern-go/reflect2 v1.0.1 // indirect
 	github.com/openzipkin/zipkin-go v0.4.0 // indirect
 	github.com/prometheus/client_golang v1.11.0 // indirect
 	github.com/prometheus/client_model v0.2.0 // indirect
 	github.com/prometheus/common v0.26.0 // indirect
 	github.com/prometheus/procfs v0.6.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.2 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.2 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.2 // indirect
 	go.opentelemetry.io/otel v1.3.0 // indirect
 	go.opentelemetry.io/otel/exporters/jaeger v1.3.0 // indirect
 	go.opentelemetry.io/otel/exporters/zipkin v1.3.0 // indirect
 	go.opentelemetry.io/otel/sdk v1.3.0 // indirect
 	go.opentelemetry.io/otel/trace v1.3.0 // indirect
+	go.uber.org/atomic v1.9.0 // indirect
 	go.uber.org/automaxprocs v1.4.0 // indirect
+	go.uber.org/multierr v1.8.0 // indirect
+	go.uber.org/zap v1.21.0 // indirect
+	golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect
+	golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
+	golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
 	golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
-	google.golang.org/grpc v1.44.0 // indirect
-	google.golang.org/protobuf v1.27.1 // indirect
+	golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
+	golang.org/x/text v0.3.7 // indirect
+	golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
+	google.golang.org/appengine v1.6.5 // indirect
+	google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7 // indirect
+	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
+	k8s.io/api v0.20.12 // indirect
+	k8s.io/apimachinery v0.20.12 // indirect
+	k8s.io/client-go v0.20.12 // indirect
+	k8s.io/klog/v2 v2.40.1 // indirect
+	k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
+	sigs.k8s.io/yaml v1.2.0 // indirect
 )

+ 33 - 0
go.sum

@@ -50,6 +50,7 @@ github.com/alicebob/miniredis/v2 v2.17.0 h1:EwLdrIS50uczw71Jc7iVSxZluTKj5nfSP8n7
 github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I=
 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
 github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
+github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
 github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
@@ -71,7 +72,9 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP
 github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
 github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -140,18 +143,21 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
 github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
 github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
 github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
 github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
 github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -183,6 +189,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
 github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
 github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
 github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
@@ -197,6 +204,7 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
 github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
 github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=
 github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
 github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
@@ -208,6 +216,7 @@ github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslC
 github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
 github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -222,6 +231,7 @@ github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhB
 github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
 github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
 github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
@@ -257,8 +267,10 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -290,6 +302,7 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi
 github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -327,6 +340,7 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b
 github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
 github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
 github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
 github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -350,8 +364,11 @@ github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5u
 github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/zeromicro/go-zero v1.3.1 h1:uVkELq9kosgRZBSERb+eG7+oY2E+BEpOJW5vZZ354Cs=
 github.com/zeromicro/go-zero v1.3.1/go.mod h1:JsgCzJSUcjZl487xtqWHzYFa7Wl4f5Gi3lcteOWgNRA=
+go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI=
 go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
+go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE=
 go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v3 v3.5.2 h1:WdnejrUtQC4nCxK0/dLTMqKOB+U5TP/2Ya0BJL+1otA=
 go.etcd.io/etcd/client/v3 v3.5.2/go.mod h1:kOOaWFFgHygyT0WlSmL8TJiXmMysO/nNUlEsSsN6W4o=
 go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
 go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
@@ -369,14 +386,18 @@ go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1
 go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
 go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
 go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0=
 go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q=
 go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA=
 go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
 go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
 go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
 go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
 go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
 golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -387,6 +408,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 h1:kETrAMYZq6WVGPa8IIixL0CaEcIUNi+1WX7grUoi3y8=
 golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -457,6 +479,7 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -516,6 +539,7 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
 golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -530,6 +554,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M=
 golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -587,6 +612,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
 google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
 google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -649,6 +675,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
 gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
 gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
 gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
@@ -670,12 +697,16 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+k8s.io/api v0.20.12 h1:LfRpmRkJLwPP8eaYehsVVmIIfg1yCBIIUHaSsdqCgHA=
 k8s.io/api v0.20.12/go.mod h1:A2brwyEkVLM3wQGNnzoAa5JsQRzHK0uoOQ+bsnv7V68=
+k8s.io/apimachinery v0.20.12 h1:2c0LIVNMvB8k2Ozstmhl2zGeCEcPazznuLYEwxFdNjM=
 k8s.io/apimachinery v0.20.12/go.mod h1:uM7hCI0NyBymUwgshMgZyte475lxhr+QH6h3cvdnzEc=
+k8s.io/client-go v0.20.12 h1:U75SxTC31BHT9i7CbX/hL4v+U1Wkzy/E1vt5ClDPp3I=
 k8s.io/client-go v0.20.12/go.mod h1:NBJj6Evp73Xy/4v/O/RDRaH0+3JoxNfjRxkyRgrdbsA=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
 k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
+k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4=
 k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
 k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=
@@ -684,6 +715,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
 sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
+sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
 sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
 sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
 sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=