From f7e3da51aee5ebf6f7ec835d70100cd994067389 Mon Sep 17 00:00:00 2001 From: mountain Date: Mon, 29 Jul 2024 11:55:57 +0900 Subject: [PATCH] =?UTF-8?q?RegisterHandlers=20=EC=8B=9C=EA=B7=B8=EB=8B=88?= =?UTF-8?q?=EC=B3=90=20=EC=88=98=EC=A0=95=20(ServerMuxInterface)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/maingate.go | 2 +- core/watch.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/maingate.go b/core/maingate.go index 3294202..c49e05a 100644 --- a/core/maingate.go +++ b/core/maingate.go @@ -431,7 +431,7 @@ func (mg *Maingate) prepare(context context.Context) (err error) { var portptr = flagx.Int("port", 80, "") -func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMux, prefix string) error { +func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux gocommon.ServerMuxInterface, prefix string) error { var allServices []*serviceDescription if err := mg.mongoClient.AllAs(CollectionService, &allServices, options.Find().SetReturnKey(false)); err != nil { return logger.ErrorWithCallStack(err) diff --git a/core/watch.go b/core/watch.go index 6857dea..6ddd491 100644 --- a/core/watch.go +++ b/core/watch.go @@ -3,13 +3,13 @@ package core import ( "context" "encoding/hex" - "net/http" "os" "path" "sync/atomic" "time" "unsafe" + "repositories.action2quare.com/ayo/gocommon" "repositories.action2quare.com/ayo/gocommon/logger" "go.mongodb.org/mongo-driver/bson" @@ -34,7 +34,7 @@ type filePipelineDocument struct { File *FileDocumentDesc `bson:"fullDocument"` } -func (mg *Maingate) watchFileCollection(parentctx context.Context, serveMux *http.ServeMux, prefix string) { +func (mg *Maingate) watchFileCollection(parentctx context.Context, serveMux gocommon.ServerMuxInterface, prefix string) { defer func() { s := recover() if s != nil { @@ -119,7 +119,7 @@ func (mg *Maingate) watchFileCollection(parentctx context.Context, serveMux *htt } } -func (mg *Maingate) watchServiceCollection(parentctx context.Context, serveMux *http.ServeMux, prefix string) { +func (mg *Maingate) watchServiceCollection(parentctx context.Context, serveMux gocommon.ServerMuxInterface, prefix string) { defer func() { s := recover() if s != nil {