move transport (#1967)

This commit is contained in:
Asim Aslam 2020-08-23 18:37:22 +01:00 committed by GitHub
parent d60d85de5c
commit c62d1d5eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 56 additions and 56 deletions

View File

@ -14,7 +14,7 @@ import (
raw "github.com/micro/go-micro/v3/codec/bytes"
"github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/metadata"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/util/buf"
"github.com/micro/go-micro/v3/util/pool"
)

View File

@ -12,8 +12,8 @@ import (
"github.com/micro/go-micro/v3/codec/proto"
"github.com/micro/go-micro/v3/codec/protorpc"
"github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/transport"
)
const (

View File

@ -2,7 +2,7 @@ package mucp
import (
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type rpcResponse struct {

View File

@ -5,7 +5,7 @@ import (
"time"
"github.com/micro/go-micro/v3/client"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
func TestCallOptions(t *testing.T) {

View File

@ -7,13 +7,13 @@ import (
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/network/transport"
thttp "github.com/micro/go-micro/v3/network/transport/http"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/router"
regRouter "github.com/micro/go-micro/v3/router/registry"
"github.com/micro/go-micro/v3/selector"
"github.com/micro/go-micro/v3/selector/roundrobin"
"github.com/micro/go-micro/v3/transport"
thttp "github.com/micro/go-micro/v3/transport/http"
)
type Options struct {

View File

@ -16,16 +16,16 @@ import (
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/network"
pb "github.com/micro/go-micro/v3/network/mucp/proto"
"github.com/micro/go-micro/v3/proxy"
"github.com/micro/go-micro/v3/registry/noop"
"github.com/micro/go-micro/v3/network/resolver/dns"
"github.com/micro/go-micro/v3/router"
"github.com/micro/go-micro/v3/server"
smucp "github.com/micro/go-micro/v3/server/mucp"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
bun "github.com/micro/go-micro/v3/network/tunnel/broker"
tun "github.com/micro/go-micro/v3/network/tunnel/transport"
"github.com/micro/go-micro/v3/proxy"
"github.com/micro/go-micro/v3/registry/noop"
"github.com/micro/go-micro/v3/router"
"github.com/micro/go-micro/v3/server"
smucp "github.com/micro/go-micro/v3/server/mucp"
"github.com/micro/go-micro/v3/util/backoff"
)

View File

@ -2,12 +2,12 @@ package network
import (
"github.com/google/uuid"
"github.com/micro/go-micro/v3/network/tunnel"
tmucp "github.com/micro/go-micro/v3/network/tunnel/mucp"
"github.com/micro/go-micro/v3/proxy"
"github.com/micro/go-micro/v3/proxy/mucp"
"github.com/micro/go-micro/v3/router"
regRouter "github.com/micro/go-micro/v3/router/registry"
"github.com/micro/go-micro/v3/network/tunnel"
tmucp "github.com/micro/go-micro/v3/network/tunnel/mucp"
)
type Option func(*Options)

View File

@ -2,9 +2,9 @@
package registry
import (
"github.com/micro/go-micro/v3/network/resolver"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/network/resolver"
)
// Resolver is a registry network resolver

View File

@ -6,7 +6,7 @@ import (
"crypto/tls"
"net"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
maddr "github.com/micro/go-micro/v3/util/addr"
mnet "github.com/micro/go-micro/v3/util/net"
mls "github.com/micro/go-micro/v3/util/tls"
@ -14,7 +14,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
pb "github.com/micro/go-micro/v3/network/transport/grpc/proto"
)
type grpcTransport struct {

View File

@ -4,7 +4,7 @@ import (
"net"
"testing"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
func expectedPort(t *testing.T, expected string, lsn transport.Listener) {

View File

@ -5,8 +5,8 @@ import (
"github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/transport"
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
"github.com/micro/go-micro/v3/network/transport"
pb "github.com/micro/go-micro/v3/network/transport/grpc/proto"
"google.golang.org/grpc/peer"
)

View File

@ -1,8 +1,8 @@
package grpc
import (
"github.com/micro/go-micro/v3/transport"
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
"github.com/micro/go-micro/v3/network/transport"
pb "github.com/micro/go-micro/v3/network/transport/grpc/proto"
"google.golang.org/grpc"
)

View File

@ -13,7 +13,7 @@ import (
"sync"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
maddr "github.com/micro/go-micro/v3/util/addr"
"github.com/micro/go-micro/v3/util/buf"
mnet "github.com/micro/go-micro/v3/util/net"

View File

@ -4,7 +4,7 @@ import (
"sync"
"testing"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
func call(b *testing.B, c int) {

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
func expectedPort(t *testing.T, expected string, lsn transport.Listener) {

View File

@ -4,7 +4,7 @@ import (
"context"
"net/http"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
// Handle registers the handler for the given pattern.

View File

@ -10,7 +10,7 @@ import (
"sync"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
maddr "github.com/micro/go-micro/v3/util/addr"
mnet "github.com/micro/go-micro/v3/util/net"
)

View File

@ -4,7 +4,7 @@ import (
"os"
"testing"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
func TestMemoryTransport(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"context"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
"github.com/micro/go-micro/v3/network/tunnel/mucp"
)

View File

@ -9,7 +9,7 @@ import (
"github.com/google/uuid"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type link struct {

View File

@ -9,7 +9,7 @@ import (
"github.com/google/uuid"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
)

View File

@ -8,7 +8,7 @@ import (
"time"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
)

View File

@ -4,8 +4,8 @@ import (
"time"
"github.com/google/uuid"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/transport/grpc"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/transport/grpc"
)
var (

View File

@ -1,7 +1,7 @@
package transport
import (
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
)

View File

@ -4,7 +4,7 @@ package transport
import (
"context"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/tunnel"
"github.com/micro/go-micro/v3/network/tunnel/mucp"
)

View File

@ -5,7 +5,7 @@ import (
"errors"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
const (

View File

@ -10,13 +10,13 @@ import (
gcli "github.com/micro/go-micro/v3/client/grpc"
"github.com/micro/go-micro/v3/errors"
pberr "github.com/micro/go-micro/v3/errors/proto"
tgrpc "github.com/micro/go-micro/v3/network/transport/grpc"
rmemory "github.com/micro/go-micro/v3/registry/memory"
"github.com/micro/go-micro/v3/router"
rtreg "github.com/micro/go-micro/v3/router/registry"
"github.com/micro/go-micro/v3/server"
gsrv "github.com/micro/go-micro/v3/server/grpc"
pb "github.com/micro/go-micro/v3/server/grpc/proto"
tgrpc "github.com/micro/go-micro/v3/transport/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
)

View File

@ -3,9 +3,9 @@ package mucp
import (
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/codec"
thttp "github.com/micro/go-micro/v3/network/transport/http"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/server"
thttp "github.com/micro/go-micro/v3/transport/http"
)
func newOptions(opt ...server.Option) server.Options {

View File

@ -11,7 +11,7 @@ import (
"github.com/micro/go-micro/v3/codec/jsonrpc"
"github.com/micro/go-micro/v3/codec/proto"
"github.com/micro/go-micro/v3/codec/protorpc"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/oxtoacart/bpool"
"github.com/pkg/errors"
)

View File

@ -6,7 +6,7 @@ import (
"testing"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
// testCodec is a dummy codec that only knows how to encode nil bodies

View File

@ -4,7 +4,7 @@ import (
"bytes"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/util/buf"
)

View File

@ -4,7 +4,7 @@ import (
"net/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type rpcResponse struct {

View File

@ -17,9 +17,9 @@ import (
raw "github.com/micro/go-micro/v3/codec/bytes"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/metadata"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/util/addr"
"github.com/micro/go-micro/v3/util/backoff"
mnet "github.com/micro/go-micro/v3/util/net"

View File

@ -5,9 +5,9 @@ import (
"reflect"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/micro/go-micro/v3/transport"
)
const (

View File

@ -11,10 +11,10 @@ import (
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/debug/trace"
"github.com/micro/go-micro/v3/network/transport"
thttp "github.com/micro/go-micro/v3/network/transport/http"
"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 {

View File

@ -8,12 +8,12 @@ import (
bmemory "github.com/micro/go-micro/v3/broker/memory"
"github.com/micro/go-micro/v3/client"
"github.com/micro/go-micro/v3/client/grpc"
tmemory "github.com/micro/go-micro/v3/network/transport/memory"
rmemory "github.com/micro/go-micro/v3/registry/memory"
"github.com/micro/go-micro/v3/router"
rtreg "github.com/micro/go-micro/v3/router/registry"
"github.com/micro/go-micro/v3/server"
grpcsrv "github.com/micro/go-micro/v3/server/grpc"
tmemory "github.com/micro/go-micro/v3/transport/memory"
cw "github.com/micro/go-micro/v3/util/client"
)

View File

@ -4,7 +4,7 @@ package io
import (
"io"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type rwc struct {

View File

@ -5,7 +5,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type pool struct {

View File

@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/transport/memory"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/network/transport/memory"
)
func testPool(t *testing.T, size int, ttl time.Duration) {

View File

@ -3,7 +3,7 @@ package pool
import (
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
type Options struct {

View File

@ -4,7 +4,7 @@ package pool
import (
"time"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
// Pool is an interface for connection pooling

View File

@ -4,7 +4,7 @@ package socket
import (
"io"
"github.com/micro/go-micro/v3/transport"
"github.com/micro/go-micro/v3/network/transport"
)
// Socket is our pseudo socket for transport.Socket