api

package
v0.0.12-entry Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntryManagers

func NewEntryManagers() *entry.Mgrs

func NewGlicko2Matcher

func NewGlicko2Matcher(roomChannel chan common.Result, conf *config.MatchConfig, mgrs *entry.Mgrs) *glicko2.Matcher

Types

type API

type API struct {
	MS service.Match
	M  *matcher.Matcher
	PM *entry.PlayerMgr
	GM *entry.GroupMgr
	TM *entry.TeamMgr
	RM *entry.RoomMgr
}

func NewAPI

func NewAPI(configer config.Configer[config.MatchConfig],
	groupChannel chan entry.Group, roomChannel chan common.Result,
	dt timer.Operator[int64], gm *glicko2.Matcher, mgrs *entry.Mgrs) *API

func Start

func Start(
	sc config.Configer[config.ServerConfig],
	mc config.Configer[config.MatchConfig],
) (api *API, shutdown func())

Start initializes the api components and starts them.

func (*API) ReloadEntries

func (api *API) ReloadEntries() error

ReloadEntries reloads the entries when the server starts.

func (*API) SaveEntries

func (api *API) SaveEntries() error

SaveEntries saves the entries when the server stops.

type InfraBase

InfraBase is the base infrastructure for the api.

func NewInfraBase

NewInfraBase creates a new InfraBase.

func (*InfraBase) Start

func (i *InfraBase) Start()

Start starts the infrastructure, if any errors occur, it will panic.

func (*InfraBase) Stop

func (i *InfraBase) Stop()

Stop stops the infrastructure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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