Added coloured logs and fixed a concurrency bug in the localpubsub adapter

This commit is contained in:
2024-02-06 18:44:45 -07:00
parent e44c858ab3
commit 53e2254795
10 changed files with 61 additions and 25 deletions

View File

@ -7,9 +7,10 @@ import (
"github.com/labstack/echo/v4"
"goth.stack/lib"
"goth.stack/lib/pubsub"
)
func SSE(c echo.Context, pubSub lib.PubSub) error {
func SSE(c echo.Context, pubSub pubsub.PubSub) error {
if pubSub == nil {
return errors.New("pubSub is nil")
}

View File

@ -5,9 +5,10 @@ import (
"github.com/labstack/echo/v4"
"goth.stack/lib"
"goth.stack/lib/pubsub"
)
func SSEDemoSend(c echo.Context, pubSub lib.PubSub) error {
func SSEDemoSend(c echo.Context, pubSub pubsub.PubSub) error {
channel := c.QueryParam("channel")
if channel == "" {
channel = "default"