Add monitor/debug packages
This commit is contained in:
		
							
								
								
									
										10
									
								
								debug.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								debug.go
									
									
									
									
									
								
							| @@ -1,10 +0,0 @@ | ||||
| package grpc | ||||
|  | ||||
| import ( | ||||
| 	"github.com/micro/go-micro/server" | ||||
| 	"github.com/micro/go-micro/server/debug" | ||||
| ) | ||||
|  | ||||
| func registerDebugHandler(s server.Server) { | ||||
| 	s.Handle(s.NewHandler(&debug.Debug{s.Options().DebugHandler}, server.InternalHandler(true))) | ||||
| } | ||||
							
								
								
									
										1
									
								
								grpc.go
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								grpc.go
									
									
									
									
									
								
							| @@ -700,7 +700,6 @@ func (g *grpcServer) Deregister() error { | ||||
| } | ||||
|  | ||||
| func (g *grpcServer) Start() error { | ||||
| 	registerDebugHandler(g) | ||||
| 	config := g.opts | ||||
|  | ||||
| 	// micro: config.Transport.Listen(config.Address) | ||||
|   | ||||
| @@ -8,7 +8,6 @@ import ( | ||||
| 	"github.com/micro/go-micro/codec" | ||||
| 	"github.com/micro/go-micro/registry" | ||||
| 	"github.com/micro/go-micro/server" | ||||
| 	"github.com/micro/go-micro/server/debug" | ||||
| 	"github.com/micro/go-micro/transport" | ||||
| 	"google.golang.org/grpc" | ||||
| 	"google.golang.org/grpc/encoding" | ||||
| @@ -89,10 +88,6 @@ func newOptions(opt ...server.Option) server.Options { | ||||
| 		opts.Transport = transport.DefaultTransport | ||||
| 	} | ||||
|  | ||||
| 	if opts.DebugHandler == nil { | ||||
| 		opts.DebugHandler = debug.DefaultHandler | ||||
| 	} | ||||
|  | ||||
| 	if len(opts.Address) == 0 { | ||||
| 		opts.Address = server.DefaultAddress | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user