core

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matchmaker

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

Matchmaker implements the matchmaking logic using an internal MemoryMatchClient to handle player pair matching.

func NewMatchmaker

func NewMatchmaker() *Matchmaker

NewMatchmaker creates a new instance of Matchmaker with a newly initialized MemoryMatchClient.

func (*Matchmaker) RequestMatch

func (m *Matchmaker) RequestMatch(ctx context.Context, playerID, playerAddr string) (<-chan []string, error)

RequestMatch delegates to the MemoryMatchClient to handle the actual request. Returns appropriate response based on whether a player was found to match with.

type MatchmakingClient

type MatchmakingClient interface {
	RequestMatch(ctx context.Context, playerID string, gameID string) ([]string, error)
}

MatchmakingClient defines an interface for matchmaking service operations that can query and respond to matchmaking requests based on a specific game ID.

Jump to

Keyboard shortcuts

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