feat: 基本的websocket echo服务
This commit is contained in:
@ -6,12 +6,12 @@ import (
|
||||
"time"
|
||||
|
||||
"git.jinshen.cn/remilia/push-server/interval/api/dto"
|
||||
"git.jinshen.cn/remilia/push-server/interval/hub"
|
||||
"git.jinshen.cn/remilia/push-server/interval/model"
|
||||
"git.jinshen.cn/remilia/push-server/interval/ws"
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
func PushHandler(hub *hub.Hub) http.HandlerFunc {
|
||||
func PushHandler(hub *ws.Hub) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
topicStr := chi.URLParam(r, "topic")
|
||||
topic := model.Topic(topicStr)
|
||||
|
||||
Reference in New Issue
Block a user