Added WaitingRoom to room package#1
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new Go module github.com/andreimerlescu/room providing a FIFO “waiting room” middleware intended for Gin applications, backed by a semaphore and a ticket/token mechanism to queue excess requests.
Changes:
- Added core
WaitingRoomtypes and Gin middleware implementation. - Added module scaffolding (go.mod, CI workflow, Makefile, versioning, docs/license).
- Documented intended public API and usage patterns in README.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
types.go |
Defines WaitingRoom struct, token store, and status response shape. |
room.go |
Implements middleware flow, ticket gating, HTML serving, and token generation. |
new.go |
Adds constructors and Init/Stop lifecycle wiring. |
README.md |
Documents library purpose and API surface. |
go.mod |
Declares module, Go version, and dependencies (Gin, sema). |
.github/workflows/go.yml |
Adds CI for vet/test-race/bench. |
Makefile |
Provides local test/lint/bench/fuzz targets. |
errors.go / const.go |
Adds error types and configuration constants. |
LICENSE / VERSION / .gitignore |
Project metadata and housekeeping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…g to proper atomic/mutex usage, recovers phantom tickets on error paths, and centralizes position calculation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The
roompage is designed to hold rooms in them. The first room that I can think of is theWaitingRoom. Therefore, the WaitingRoom is thefeature/startof the room package.