Add monitor/debug packages

This commit is contained in:
Asim Aslam
2019-08-06 17:53:14 +01:00
parent bb01b3ed78
commit 3adce58eb2
21 changed files with 1030 additions and 206 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/config/cmd"
"github.com/micro/go-micro/debug/handler"
"github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/server"
)
@@ -113,6 +114,14 @@ func (s *service) Stop() error {
}
func (s *service) Run() error {
// register the debug handler
s.opts.Server.Handle(
s.opts.Server.NewHandler(
handler.DefaultHandler,
server.InternalHandler(true),
),
)
if err := s.Start(); err != nil {
return err
}