Documentation
¶
Index ¶
- func NewFlags() []cli.Flag
- func NewUserInfo() interface{}
- type GameSelector
- type Gate
- type GinServer
- type Metadata
- type MicroService
- type PubSub
- type RpcHandler
- func (h *RpcHandler) CallGetRemoteLiteAccount(acctID int64) (*pbGame.GetRemoteLiteAccountReply, error)
- func (h *RpcHandler) CallUpdatePlayerExp(id int64) (*pbGame.UpdatePlayerExpReply, error)
- func (h *RpcHandler) GetGateStatus(ctx context.Context, req *pbGate.GateEmptyMessage, ...) error
- func (h *RpcHandler) UpdateUserInfo(ctx context.Context, req *pbGate.UpdateUserInfoRequest, ...) error
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserInfo ¶
func NewUserInfo() interface{}
Types ¶
type GameSelector ¶
func NewGameSelector ¶
func NewGameSelector(g *Gate, c *cli.Context) *GameSelector
func (*GameSelector) Run ¶
func (gs *GameSelector) Run() error
func (*GameSelector) SelectGame ¶
func (gs *GameSelector) SelectGame(userID string, userName string) (*UserInfo, Metadata)
func (*GameSelector) UpdateUserInfo ¶
func (gs *GameSelector) UpdateUserInfo(info *UserInfo)
type Gate ¶
func (*Gate) GateResult ¶
func (g *Gate) GateResult()
type GinServer ¶
type GinServer struct {
// contains filtered or unexported fields
}
func NewGinServer ¶
type MicroService ¶
type MicroService struct {
// contains filtered or unexported fields
}
func NewMicroService ¶
func NewMicroService(g *Gate, c *ucli.Context) *MicroService
func (*MicroService) GetDefaultGameID ¶
func (s *MicroService) GetDefaultGameID() int16
func (*MicroService) GetServiceMetadatas ¶
func (s *MicroService) GetServiceMetadatas(name string) []map[string]string
func (*MicroService) Run ¶
func (s *MicroService) Run() error
func (*MicroService) StoreWrite ¶
func (s *MicroService) StoreWrite(key string, value string)
type RpcHandler ¶
type RpcHandler struct {
// contains filtered or unexported fields
}
func NewRpcHandler ¶
func NewRpcHandler(g *Gate, ucli *cli.Context) *RpcHandler
func (*RpcHandler) CallGetRemoteLiteAccount ¶
func (h *RpcHandler) CallGetRemoteLiteAccount(acctID int64) (*pbGame.GetRemoteLiteAccountReply, error)
/////////////////////////////////////////// rpc call ///////////////////////////////////////////
func (*RpcHandler) CallUpdatePlayerExp ¶
func (h *RpcHandler) CallUpdatePlayerExp(id int64) (*pbGame.UpdatePlayerExpReply, error)
func (*RpcHandler) GetGateStatus ¶
func (h *RpcHandler) GetGateStatus(ctx context.Context, req *pbGate.GateEmptyMessage, rsp *pbGate.GetGateStatusReply) error
/////////////////////////////////////////// rpc receive ///////////////////////////////////////////
func (*RpcHandler) UpdateUserInfo ¶
func (h *RpcHandler) UpdateUserInfo(ctx context.Context, req *pbGate.UpdateUserInfoRequest, rsp *pbGate.GateEmptyMessage) error
type UserInfo ¶
type UserInfo struct { UserID int64 `bson:"_id"` AccountID int64 `bson:"account_id"` GameID int16 `bson:"game_id"` PlayerID int64 `bson:"player_id"` PlayerName string `bson:"player_name"` PlayerLevel int32 `bson:"player_level"` Expire *time.Timer `bson:"-"` }
func (*UserInfo) ResetExpire ¶
func (u *UserInfo) ResetExpire()
func (*UserInfo) StopExpire ¶
func (u *UserInfo) StopExpire()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.