lobby

package
v0.0.0-...-d26b62e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthPingResponse

type HealthPingResponse struct {
	Count   int    `json:"count"`
	Running bool   `json:"running"`
	LobbyID string `json:"lobbyId"`
}

type Manager

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

func NewManager

func NewManager(logger *zap.SugaredLogger, agonesClient versioned.Interface, classes []models.Class) *Manager

func (*Manager) Connect

func (m *Manager) Connect(id string) (*TicketRequestResult, error)

func (*Manager) GetIndex

func (m *Manager) GetIndex(class int, id string) int

func (*Manager) GetRegisteredClasses

func (m *Manager) GetRegisteredClasses() []models.Class

func (*Manager) GetRegisteredLobbies

func (m *Manager) GetRegisteredLobbies(count int) [][]models.LobbyBase

func (*Manager) GetRegisteredLobbiesOfClass

func (m *Manager) GetRegisteredLobbiesOfClass(index, count, class int) []models.LobbyBase

func (*Manager) NewLobby

func (m *Manager) NewLobby(classIndex int) (*TicketRequestResult, error)

NewLobby allocates a new GameServer for a new RoundId

func (*Manager) PingHealth

func (m *Manager) PingHealth(addr string) error

func (*Manager) Remove

func (m *Manager) Remove(class int, lobbyId string)

func (*Manager) RemoveLobby

func (m *Manager) RemoveLobby(class int, i int, lobbyId string)

func (*Manager) RequestTicket

func (m *Manager) RequestTicket(class int) (*TicketRequestResult, error)

RequestTicket requests a ticket of a available game server from the manger.

func (*Manager) SearchWithClass

func (m *Manager) SearchWithClass(class int) ([]models.LobbyBase, error)

func (*Manager) SearchWithParams

func (m *Manager) SearchWithParams(min, max, blind int) ([]models.LobbyBase, error)

type TicketRequestResult

type TicketRequestResult struct {
	Address string
	LobbyId string
}

Jump to

Keyboard shortcuts

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