mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-04 16:40:21 +00:00
fix agent connect
This commit is contained in:
1 parent
62a0b32577
commit
c5bacf3e84
7 files changed
+60
-64
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
"github.com/naiba/nezha/service/singleton"
|
||||
)
|
||||
|
||||
func ServeRPC(l net.Listener) {
|
||||
func ServeRPC() http.Handler {
|
||||
server := grpc.NewServer()
|
||||
rpcService.NezhaHandlerSingleton = rpcService.NewNezhaHandler()
|
||||
pb.RegisterNezhaServiceServer(server, rpcService.NezhaHandlerSingleton)
|
||||
server.Serve(l)
|
||||
return server
|
||||
}
|
||||
|
||||
func DispatchTask(serviceSentinelDispatchBus <-chan model.Monitor) {
|
||||
|
||||
Reference in new issue
Block a user