add path check for multiplexer (#451)

This commit is contained in:
UUBulb
2024-10-23 12:55:10 +08:00
committed by GitHub
parent cb9436a8f7
commit 8d0f6fb7c4
2 changed files with 7 additions and 8 deletions

View File

@@ -1,8 +1,6 @@
package rpc
import (
"net/http"
"google.golang.org/grpc"
"github.com/naiba/nezha/model"
@@ -11,7 +9,7 @@ import (
"github.com/naiba/nezha/service/singleton"
)
func ServeRPC() http.Handler {
func ServeRPC() *grpc.Server {
server := grpc.NewServer()
rpcService.NezhaHandlerSingleton = rpcService.NewNezhaHandler()
pb.RegisterNezhaServiceServer(server, rpcService.NezhaHandlerSingleton)