go-matcher

command module
v0.0.6-asynq Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 0 Imported by: 0

README

go-matcher

Go Report Card codecov CI GitHub release (latest SemVer)

Go-matcher is a game matcher implement in Go, which supports add game mode and match strategy easily.

  • GameMode: The identifier of each different game, used to define as enum.
  • MatchStrategy: The strategy to match players, used to define as interface.

Features

  • API

    • HTTP
    • TCP
    • UDP
    • KCP
    • WebSocket
  • Service

    • match service
  • Swagger Doc

  • timer

    • native timer
    • asynq timer
    • redis timer
  • GameMode

    • GoatGame
  • MatchStrategy

    • Glicko2

Architecture

go-matcher architecture

Problems

  • change match strategy dynamic according to config changes
  • lack of GameEnd and Ready services。

Todo

  • connectorRPC
  • tcp
  • udp
  • kcp
  • websocket
  • dynamic config
  • logger
  • tracer
  • opentelementry
  • repository stats
  • match queue stats

Help

Before writing code
bash ./setup_pre_commit.sh
Start asynq web UI Asynqmon
# clone repo
git clone git@github.com:hibiken/asynqmon.git
# enter repo
cd asynqmon
# check node version
node -v
# if higher 16, should degrade it
# install nvm if not
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# install node 16
nvm install 16
# use node 16
nvm use 16
# install yarn if not
brew install yarn
# build asynqmon
make build
# start asynqmon
./asynqmon

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
examples
add
Package add is an example to test hook that checks go files with tests.
Package add is an example to test hook that checks go files with tests.
race
Package race is an example to demonstrate race conditions.
Package race is an example to demonstrate race conditions.
internal
api
pto
rpc/rpcclient/connector
Package connector provides the functionality to send rpc requests to connector server.
Package connector provides the functionality to send rpc requests to connector server.
pkg
timer
Package timer defines the interface for timer.
Package timer defines the interface for timer.

Jump to

Keyboard shortcuts

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