feat(web): Go W-G12 rooms, Redis session, and API keys
Add mode=room with room_key hub APIs, optional redis:// session backend, and web_api_key_check (sha256 pepper:key) for anlian primitives. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
26955f4f36
commit
12d2c7be69
15 files changed
+541
-13
No files matched your search
@@ -5,6 +5,21 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestNamedRoomJoinPublishLeave(t *testing.T) {
|
||||
room := "chat.room.42"
|
||||
ch := JoinRoom(room)
|
||||
ch2 := JoinRoom(room)
|
||||
PublishRoom(room, "hello-room")
|
||||
if got := readOne(ch); got != "hello-room" {
|
||||
t.Fatalf("ch1=%q", got)
|
||||
}
|
||||
if got := readOne(ch2); got != "hello-room" {
|
||||
t.Fatalf("ch2=%q", got)
|
||||
}
|
||||
LeaveRoom(room, ch)
|
||||
LeaveRoom(room, ch2)
|
||||
}
|
||||
|
||||
func TestBroadcastFanout(t *testing.T) {
|
||||
path := "/t-fanout-go"
|
||||
ch := subscribe(path)
|
||||
|
||||
Reference in new issue
Block a user