Register proto handler properly
This commit is contained in:
parent
9fab47ecdb
commit
13d2a9ec7a
11
service.go
11
service.go
@ -16,6 +16,8 @@ import (
|
|||||||
"github.com/micro/go-micro/server"
|
"github.com/micro/go-micro/server"
|
||||||
"github.com/micro/go-micro/util/log"
|
"github.com/micro/go-micro/util/log"
|
||||||
"github.com/micro/go-micro/util/wrapper"
|
"github.com/micro/go-micro/util/wrapper"
|
||||||
|
|
||||||
|
pb "github.com/micro/go-micro/debug/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
@ -141,12 +143,9 @@ func (s *service) Stop() error {
|
|||||||
|
|
||||||
func (s *service) Run() error {
|
func (s *service) Run() error {
|
||||||
// register the debug handler
|
// register the debug handler
|
||||||
s.opts.Server.Handle(
|
pb.RegisterDebugHandler(s.opts.Server,
|
||||||
s.opts.Server.NewHandler(
|
handler.DefaultHandler,
|
||||||
handler.DefaultHandler,
|
server.InternalHandler(true))
|
||||||
server.InternalHandler(true),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
// start the profiler
|
// start the profiler
|
||||||
// TODO: set as an option to the service, don't just use pprof
|
// TODO: set as an option to the service, don't just use pprof
|
||||||
|
Loading…
Reference in New Issue
Block a user