RegisterHandlers 시그니쳐 변경
This commit is contained in:
@ -266,7 +266,7 @@ func (ws *WebsocketHandler) Cleanup() {
|
||||
ws.connWaitGroup.Wait()
|
||||
}
|
||||
|
||||
func (ws *WebsocketHandler) RegisterHandlers(serveMux *http.ServeMux, prefix string) error {
|
||||
func (ws *WebsocketHandler) RegisterHandlers(serveMux gocommon.ServerMuxInterface, prefix string) error {
|
||||
url := gocommon.MakeHttpHandlerPattern(prefix, "ws")
|
||||
if *noAuthFlag {
|
||||
serveMux.HandleFunc(url, ws.upgrade_nosession)
|
||||
|
||||
@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"repositories.action2quare.com/ayo/gocommon"
|
||||
"repositories.action2quare.com/ayo/gocommon/logger"
|
||||
"repositories.action2quare.com/ayo/gocommon/session"
|
||||
|
||||
@ -18,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
type WebsocketPeerHandler interface {
|
||||
RegisterHandlers(serveMux *http.ServeMux, prefix string) error
|
||||
RegisterHandlers(serveMux gocommon.ServerMuxInterface, prefix string) error
|
||||
}
|
||||
|
||||
type peerCtorChannelValue struct {
|
||||
@ -164,7 +165,7 @@ func NewWebsocketPeerHandler[T PeerInterface](consumer session.Consumer, creator
|
||||
return wsh
|
||||
}
|
||||
|
||||
func (ws *websocketPeerHandler[T]) RegisterHandlers(serveMux *http.ServeMux, prefix string) error {
|
||||
func (ws *websocketPeerHandler[T]) RegisterHandlers(serveMux gocommon.ServerMuxInterface, prefix string) error {
|
||||
if *noAuthFlag {
|
||||
serveMux.HandleFunc(prefix, ws.upgrade_noauth)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user