{"id":43475626,"url":"https://github.com/st-matskevich/go-matchmaker","last_synced_at":"2026-02-03T07:40:17.201Z","repository":{"id":65594806,"uuid":"591798384","full_name":"st-matskevich/go-matchmaker","owner":"st-matskevich","description":"Orchestrator written in Go","archived":false,"fork":false,"pushed_at":"2024-03-10T15:13:54.000Z","size":110,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T06:27:26.245Z","etag":null,"topics":["containers","docker","go","golang","matchmaking","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/st-matskevich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-21T22:33:02.000Z","updated_at":"2023-08-02T01:22:57.000Z","dependencies_parsed_at":"2024-03-09T19:31:20.473Z","dependency_job_id":"fc061be3-0a06-40b9-b3a1-37ee7cc960b8","html_url":"https://github.com/st-matskevich/go-matchmaker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/st-matskevich/go-matchmaker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st-matskevich%2Fgo-matchmaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st-matskevich%2Fgo-matchmaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st-matskevich%2Fgo-matchmaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st-matskevich%2Fgo-matchmaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st-matskevich","download_url":"https://codeload.github.com/st-matskevich/go-matchmaker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st-matskevich%2Fgo-matchmaker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29037532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","docker","go","golang","matchmaking","orchestration"],"created_at":"2026-02-03T07:40:15.941Z","updated_at":"2026-02-03T07:40:17.190Z","avatar_url":"https://github.com/st-matskevich.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-Matchmaker\n[![Coverage](https://github.com/st-matskevich/go-matchmaker/wiki/coverage.svg)](https://raw.githack.com/wiki/st-matskevich/go-matchmaker/coverage.html)\n[![Go Report](https://goreportcard.com/badge/github.com/st-matskevich/go-matchmaker)](https://goreportcard.com/report/github.com/st-matskevich/go-matchmaker)\n[![License](https://img.shields.io/github/license/st-matskevich/go-matchmaker)](LICENSE)\n\n\nMicroservices based orchestrator for your containers written in Go. Can be used to orchestrate game servers or virtual machines.\n\n## Installation\n\n1. Install [Docker](https://docs.docker.com/get-docker/)\n2. Check variables in [docker-compose.yml](docker-compose.yml)\n```yml\n# API service\n# How long service will wait for Reservation API confirmation from created server in ms\nRESERVATION_TIMEOUT: 5000\n\n# Maker service\n# Type of backend used for containerization, available options:\n# \"docker\" - use Docker on local machine to orchestrate containers\n# \"swarm\" - use Docker Swarm cluster to orchestrate containers\nCONTAINER_BACKEND: swarm\n# How long service will wait for Reservation API confirmation from created server in ms\nRESERVATION_TIMEOUT: 5000\n# If retrying reservation, how long thread should sleep between requests\nRESERVATION_COOLDOWN: 2000\n# If retrying reservation, how many tries thread can do\nRESERVATION_RETRY_TIMES: 3\n# How long thread should wait between swarm service converge verification requests\nCONVERGE_VERIFY_COOLDOWN: 1000\n# How many tries thread can do to verify swarm service convergence\nCONVERGE_VERIFY_RETRY_TIMES: 10\n# How many threads should be created for requsets processing\nMAX_CONCURRENT_JOBS: 3\n# Docker network that will be used for starting new containers\nDOCKER_NETWORK: dev-network\n# How long thread should wait between looking for available containers\nLOOKUP_COOLDOWN: 1000\n\n# Network for compose is not created automaticaly\n# go-matchmaker containers and your servers should run on same network to be able to interact with each other\n# Change dev-network to your network if you wish\n# It should be equal to DOCKER_NETWORK variable\nnetworks:\n  dev-network:\n    name: dev-network\n```\n3. Setup secrets and additional environment variables(or create .env file)\n```properties\n# Image to use as server container\nIMAGE_TO_PULL=docker.io/stmatskevich/go-dummyserver\n# Image port that should be exposed, protocol can be also specified, tcp is used if nothing added\nIMAGE_EXPOSE_PORT=3000/tcp\n# Image port that provide Reservation API\nIMAGE_CONTROL_PORT=3000\n# Image registry username, if authorization not needed leave blank\nIMAGE_REGISTRY_USERNAME=stmatskevich\n# Image registry password, if authorization not needed leave blank\nIMAGE_REGISTRY_PASSWORD=supersecretpassword\n```\n4. If \"swarm\" backend is used, [setup Swarm cluster](https://docs.docker.com/engine/swarm/swarm-tutorial/create-swarm/)\n5. Create Docker network that was defined as `DOCKER_NETWORK` in [docker-compose.yml](docker-compose.yml). Use \"overlay\" driver for \"swarm\" backend and \"bridge\" driver for \"docker\" backend\n```sh\n# Docker backend\ndocker network create -d bridge dev-network  \n\n# Swarm backend\ndocker network create -d overlay dev-network  \n```\n6. Run docker compose from root directory\n```sh\ndocker compose up --build -d\n```\n### Optional\n * Use proc/sys/net/ipv4/ip_local_port_range to limit number of ports that will be used for exposing\n\n## Reservation API\n\nTo use your own image with go-matchmaker, it should serve \u003cb\u003eReservation API\u003c/b\u003e on `IMAGE_CONTROL_PORT` port.\n\n### Reservation API Endpoints\n\n#### \u003ccode\u003ePOST \u003cb\u003e/reservation/{client-id}\u003c/b\u003e\u003c/code\u003e\nUsed from \u003cb\u003eMaker\u003c/b\u003e service to reserve slot for client with \u003ccode\u003eclient-id\u003c/code\u003e id.\n\nRespond with `200` if slot was successfully reserved, `403` otherwise.\n\n#### \u003ccode\u003eGET \u003cb\u003e/reservation/{client-id}\u003c/b\u003e\u003c/code\u003e\nUsed from \u003cb\u003eAPI\u003c/b\u003e service to verify reservation for client with \u003ccode\u003eclient-id\u003c/code\u003e id.\n\nRespond with `200` if there is a slot reserved for specified client, `404` otherwise.\n\nYou can use [go-dummyserver](https://github.com/st-matskevich/go-dummyserver) as example or image for testing. Available as [image](https://hub.docker.com/r/stmatskevich/go-dummyserver) on Docker Hub. \n\n\n## Clients authentication\n\nNo special authentication included by default, but all interfaces are already here for you.\n\nTo use authentication you need to implement your own type with \u003ccode\u003eAuthorize\u003c/code\u003e method form \u003ccode\u003e[Authorizer](api/auth/auth.go)\u003c/code\u003e interface. Then pass your type to \u003ccode\u003eauth.New()\u003c/code\u003e middleware in \u003ccode\u003e[api/main.go](api/main.go)\u003c/code\u003e.\n\nYou can use \u003ccode\u003e[DummyAuthorizer](api/auth/auth.go)\u003c/code\u003e as example.\n\n## Usage\n\nTo request server send \u003ccode\u003ePOST \u003cb\u003e/request\u003c/b\u003e\u003c/code\u003e request with authorization token:\n```sh\ncurl -X POST http://localhost:3000/request -H \"Authorization: 5jg86j39jdf04\"\n```\n\nTo view services logs use:\n```sh\n# API service\ndocker compose logs api -f\n\n# Maker service\ndocker compose logs maker -f\n```\n\n## Documentation\n\nSee [DOCUMENTATION](DOCUMENTATION.md) for more information.\n\n## Built with\n\n- [Go](https://go.dev/)\n- [Docker](https://www.docker.com/)\n- [Redis](https://github.com/redis/redis)\n- [Moby Project](https://github.com/moby/moby)\n- [Fiber](https://github.com/gofiber/fiber)\n- [go-redis](https://github.com/redis/go-redis)\n- [testify](https://github.com/stretchr/testify)\n- [godotenv](https://github.com/joho/godotenv)\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n## Contributing\n\nWant a new feature added? Found a bug?\nGo ahead an open [a new issue](https://github.com/st-matskevich/go-matchmaker/issues/new) or feel free to submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst-matskevich%2Fgo-matchmaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst-matskevich%2Fgo-matchmaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst-matskevich%2Fgo-matchmaker/lists"}