move transport (#1967)
This commit is contained in:
parent
d60d85de5c
commit
c62d1d5eb8
@ -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"
|
||||
)
|
||||
|
@ -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 (
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 {
|
@ -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) {
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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"
|
@ -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) {
|
@ -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) {
|
@ -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.
|
@ -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"
|
||||
)
|
@ -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) {
|
@ -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"
|
||||
)
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
"github.com/micro/go-micro/v3/network/transport"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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 (
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user