Versions in this module Expand all Collapse all v0 v0.1.0 Jan 6, 2021 Changes in this version + func NewFlags() []cli.Flag + func NewUserInfo() interface + type GameSelector struct + func NewGameSelector(g *Gate, c *cli.Context) *GameSelector + func (gs *GameSelector) Exit(ctx context.Context) + func (gs *GameSelector) Main(ctx context.Context) error + func (gs *GameSelector) OnUserEvicted(key lru.Key, value interface{}) + func (gs *GameSelector) Run(ctx context.Context) error + func (gs *GameSelector) SelectGame(userID string, userName string) (*UserInfo, Metadata) + func (gs *GameSelector) UpdateUserInfo(req *pbGate.UpdateUserInfoRequest) error + type Gate struct + ID int16 + func New() *Gate + func (g *Gate) Action(ctx *cli.Context) error + func (g *Gate) GateResult() error + func (g *Gate) Run(arguments []string) error + func (g *Gate) Stop() + type GinServer struct + func NewGinServer(g *Gate, ctx *cli.Context) *GinServer + func (s *GinServer) Exit(ctx context.Context) + func (s *GinServer) Main(ctx *cli.Context) error + func (s *GinServer) Run(ctx *cli.Context) error + type Metadata map[string]string + type MicroService struct + func NewMicroService(g *Gate, ctx *ucli.Context) *MicroService + func (s *MicroService) GetServiceMetadatas(name string) []map[string]string + func (s *MicroService) Run(ctx context.Context) error + func (s *MicroService) SelectGameEntry() (int, error) + func (s *MicroService) StoreWrite(key string, value string) error + type PubSub struct + func NewPubSub(g *Gate) *PubSub + func (ps *PubSub) PubGateResult(ctx context.Context, win bool) error + type RpcHandler struct + func NewRpcHandler(g *Gate, ucli *cli.Context) *RpcHandler + func (h *RpcHandler) CallGetRemoteLitePlayer(id int64) (*pbGame.GetRemoteLitePlayerReply, error) + func (h *RpcHandler) CallUpdatePlayerExp(id int64) (*pbGame.UpdatePlayerExpReply, error) + func (h *RpcHandler) GetGateStatus(ctx context.Context, req *pbGate.GateEmptyMessage, ...) error + func (h *RpcHandler) SyncPlayerInfo(ctx context.Context, req *pbGate.SyncPlayerInfoRequest, ...) error + func (h *RpcHandler) UpdateUserInfo(ctx context.Context, req *pbGate.UpdateUserInfoRequest, ...) error + type UserInfo struct + AccountID int64 + PlayerID int64 + PlayerLevel int32 + PlayerName string + UserID int64 + func (u *UserInfo) AfterLoad() error + func (u *UserInfo) GetObjID() int64 + func (u *UserInfo) GetStoreIndex() int64