cleanup debug and transport (#1920)

This commit is contained in:
Asim Aslam
2020-08-10 15:58:39 +01:00
committed by GitHub
parent 593b543230
commit 13f495587e
24 changed files with 635 additions and 2505 deletions

View File

@@ -9,7 +9,6 @@ import (
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/server"
"github.com/micro/go-micro/v3/transport"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
)
@@ -70,7 +69,6 @@ func newOptions(opt ...server.Option) server.Options {
Metadata: map[string]string{},
Broker: http.NewBroker(),
Registry: mdns.NewRegistry(),
Transport: transport.DefaultTransport,
Address: server.DefaultAddress,
Name: server.DefaultName,
Id: server.DefaultId,

View File

@@ -14,6 +14,7 @@ import (
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/transport"
thttp "github.com/micro/go-micro/v3/transport/http"
)
type Options struct {
@@ -72,7 +73,7 @@ func newOptions(opt ...Option) Options {
}
if opts.Transport == nil {
opts.Transport = transport.DefaultTransport
opts.Transport = thttp.NewTransport()
}
if opts.RegisterCheck == nil {
@@ -228,7 +229,7 @@ func TLSConfig(t *tls.Config) Option {
// set the default transport if one is not
// already set. Required for Init call below.
if o.Transport == nil {
o.Transport = transport.DefaultTransport
o.Transport = thttp.NewTransport()
}
// set the transport tls