muip

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ticker = 5 // 定时器间隔时间 / s
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Api added in v1.2.1

type Api struct {
	Router *gin.Engine
	// contains filtered or unexported fields
}

func (*Api) CmdIdInitRouter added in v1.2.1

func (a *Api) CmdIdInitRouter(c *gin.Context)

func (*Api) HandleDefault added in v1.2.1

func (a *Api) HandleDefault(c *gin.Context)

func (*Api) InitRouter added in v1.2.1

func (a *Api) InitRouter()

func (*Api) StartApi added in v1.2.1

func (a *Api) StartApi() error

func (*Api) ToNode added in v1.2.1

func (a *Api) ToNode(c *gin.Context, cmdId uint16, message pb.Message)

来自api的消息转发到nodeserver

type MuipServer added in v1.2.1

type MuipServer struct {
	AppId   uint32
	ApiAddr string
	Store   *db.Store
	Config  *config.Config
	Api     *Api

	Ticker *time.Ticker
	Stop   chan struct{}
	// contains filtered or unexported fields
}

func NewMuip

func NewMuip(config *config.Config, appid string) *MuipServer

func (*MuipServer) Close added in v1.2.1

func (s *MuipServer) Close()

func (*MuipServer) GlobalRotationEvent added in v1.2.1

func (s *MuipServer) GlobalRotationEvent()

type NodeService added in v1.2.1

type NodeService struct {
	// contains filtered or unexported fields
}

func (*NodeService) MuipToNodePingReq added in v1.2.1

func (n *NodeService) MuipToNodePingReq()

func (*NodeService) MuipToNodePingRsp added in v1.2.1

func (n *NodeService) MuipToNodePingRsp(serviceMsg pb.Message)

func (*NodeService) ServiceConnectionReq added in v1.2.1

func (n *NodeService) ServiceConnectionReq()

向node注册

func (*NodeService) ServiceConnectionRsp added in v1.2.1

func (n *NodeService) ServiceConnectionRsp(serviceMsg pb.Message)

type Service added in v1.2.1

type Service struct {
	AppId     string
	PlayerNum int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL