Move tunnel to its own package (#1921)

This commit is contained in:
Asim Aslam
2020-08-10 17:31:21 +01:00
committed by GitHub
parent 13f495587e
commit 4db8ea8f6a
11 changed files with 72 additions and 68 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/tunnel"
"github.com/micro/go-micro/v3/tunnel/mucp"
)
type tunBroker struct {
@@ -176,7 +177,7 @@ func NewBroker(opts ...broker.Option) broker.Broker {
}
t, ok := options.Context.Value(tunnelKey{}).(tunnel.Tunnel)
if !ok {
t = tunnel.NewTunnel()
t = mucp.NewTunnel()
}
a, ok := options.Context.Value(tunnelAddr{}).(string)