internal

package
v0.0.0-...-8a99b67 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorldReserveTimeout = 30 // 秒
)

Variables

View Source
var Module = fx.Provide(
	func(
		l *zap.Logger,
		agParams agonesfx.SDKParams,
		setting rfx.RoomSettingParams,
		mqParams mfx.MessageQueueParams,
	) (out sfx.ZinxServiceResult, err error) {
		if svc, e := NewService(
			l,
			mqParams.MessageQueue,
			agParams.SDK,
			setting,
		); e != nil {
			err = e
		} else {
			out.ZinxService = svc
		}
		return
	},
)

Functions

This section is empty.

Types

type Agones

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

func NewAgones

func NewAgones(
	agones aiface.IAgones,
	logger *zap.Logger,
	roomMgr *RoomMgr,
) (*Agones, error)

func (*Agones) CheckAndDeleteReserve

func (a *Agones) CheckAndDeleteReserve(uid string) bool

func (*Agones) DeletePlayer

func (a *Agones) DeletePlayer(uid string) error

type RoomMgr

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

func NewRoomMgr

func NewRoomMgr(logger *zap.Logger, agonesSdk aiface.IAgones) *RoomMgr

func (*RoomMgr) LoadOrCreateRoom

func (rm *RoomMgr) LoadOrCreateRoom(roomId string, creator riface.RoomCreator) (riface.IRoom, error)

func (*RoomMgr) LoadRoom

func (rm *RoomMgr) LoadRoom(roomId string) (riface.IRoom, error)

func (*RoomMgr) SetCanShutdown

func (rm *RoomMgr) SetCanShutdown()

type Service

type Service struct {
	znet.BaseRouter
	// contains filtered or unexported fields
}

func NewService

func NewService(
	l *zap.Logger,
	mq miface.MessageQueue,
	agones aiface.IAgones,
	setting rfx.RoomSettingParams,
) (result *Service, err error)

func (*Service) Handle

func (s *Service) Handle(request ziface.IRequest)

func (*Service) RegisterWithServer

func (s *Service) RegisterWithServer(server siface.IZinxServer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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