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,7 +8,6 @@ import (
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/server/debug"
"github.com/micro/go-micro/transport"
)
@@ -36,9 +35,6 @@ type Options struct {
// The router for requests
Router Router
// Debug Handler which can be set by a user
DebugHandler debug.Handler
// Other options for implementations of the interface
// can be stored in a context
Context context.Context
@@ -66,10 +62,6 @@ func newOptions(opt ...Option) Options {
opts.Transport = transport.DefaultTransport
}
if opts.DebugHandler == nil {
opts.DebugHandler = debug.DefaultHandler
}
if opts.RegisterCheck == nil {
opts.RegisterCheck = DefaultRegisterCheck
}
@@ -156,13 +148,6 @@ func Transport(t transport.Transport) Option {
}
}
// DebugHandler for this server
func DebugHandler(d debug.Handler) Option {
return func(o *Options) {
o.DebugHandler = d
}
}
// Metadata associated with the server
func Metadata(md map[string]string) Option {
return func(o *Options) {