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

@@ -6,6 +6,7 @@ import (
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/tunnel"
"github.com/micro/go-micro/v3/tunnel/mucp"
)
type tunTransport struct {
@@ -31,7 +32,7 @@ func (t *tunTransport) Init(opts ...transport.Option) error {
// get the tunnel
tun, ok := t.options.Context.Value(tunnelKey{}).(tunnel.Tunnel)
if !ok {
tun = tunnel.NewTunnel()
tun = mucp.NewTunnel()
}
// get the transport