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"
|
raw "github.com/micro/go-micro/v3/codec/bytes"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/micro/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/metadata"
|
"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/buf"
|
||||||
"github.com/micro/go-micro/v3/util/pool"
|
"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/proto"
|
||||||
"github.com/micro/go-micro/v3/codec/protorpc"
|
"github.com/micro/go-micro/v3/codec/protorpc"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"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/registry"
|
||||||
"github.com/micro/go-micro/v3/transport"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -2,7 +2,7 @@ package mucp
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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 {
|
type rpcResponse struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"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) {
|
func TestCallOptions(t *testing.T) {
|
||||||
|
@ -7,13 +7,13 @@ import (
|
|||||||
"github.com/micro/go-micro/v3/broker"
|
"github.com/micro/go-micro/v3/broker"
|
||||||
"github.com/micro/go-micro/v3/broker/http"
|
"github.com/micro/go-micro/v3/broker/http"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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/registry"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/micro/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
regRouter "github.com/micro/go-micro/v3/router/registry"
|
||||||
"github.com/micro/go-micro/v3/selector"
|
"github.com/micro/go-micro/v3/selector"
|
||||||
"github.com/micro/go-micro/v3/selector/roundrobin"
|
"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 {
|
type Options struct {
|
||||||
|
@ -16,16 +16,16 @@ import (
|
|||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/micro/go-micro/v3/logger"
|
||||||
"github.com/micro/go-micro/v3/network"
|
"github.com/micro/go-micro/v3/network"
|
||||||
pb "github.com/micro/go-micro/v3/network/mucp/proto"
|
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/network/resolver/dns"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
"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/tunnel"
|
"github.com/micro/go-micro/v3/network/tunnel"
|
||||||
bun "github.com/micro/go-micro/v3/network/tunnel/broker"
|
bun "github.com/micro/go-micro/v3/network/tunnel/broker"
|
||||||
tun "github.com/micro/go-micro/v3/network/tunnel/transport"
|
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"
|
"github.com/micro/go-micro/v3/util/backoff"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@ package network
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
"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"
|
||||||
"github.com/micro/go-micro/v3/proxy/mucp"
|
"github.com/micro/go-micro/v3/proxy/mucp"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/micro/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
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)
|
type Option func(*Options)
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
package registry
|
package registry
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/micro/go-micro/v3/network/resolver"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/micro/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/mdns"
|
"github.com/micro/go-micro/v3/registry/mdns"
|
||||||
"github.com/micro/go-micro/v3/network/resolver"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Resolver is a registry network resolver
|
// Resolver is a registry network resolver
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"net"
|
"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"
|
maddr "github.com/micro/go-micro/v3/util/addr"
|
||||||
mnet "github.com/micro/go-micro/v3/util/net"
|
mnet "github.com/micro/go-micro/v3/util/net"
|
||||||
mls "github.com/micro/go-micro/v3/util/tls"
|
mls "github.com/micro/go-micro/v3/util/tls"
|
||||||
@ -14,7 +14,7 @@ import (
|
|||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials"
|
"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 {
|
type grpcTransport struct {
|
@ -4,7 +4,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"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) {
|
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/errors"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/micro/go-micro/v3/logger"
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
|
pb "github.com/micro/go-micro/v3/network/transport/grpc/proto"
|
||||||
"google.golang.org/grpc/peer"
|
"google.golang.org/grpc/peer"
|
||||||
)
|
)
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
|
pb "github.com/micro/go-micro/v3/network/transport/grpc/proto"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
@ -13,7 +13,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"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"
|
maddr "github.com/micro/go-micro/v3/util/addr"
|
||||||
"github.com/micro/go-micro/v3/util/buf"
|
"github.com/micro/go-micro/v3/util/buf"
|
||||||
mnet "github.com/micro/go-micro/v3/util/net"
|
mnet "github.com/micro/go-micro/v3/util/net"
|
@ -4,7 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func call(b *testing.B, c int) {
|
func call(b *testing.B, c int) {
|
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"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) {
|
func expectedPort(t *testing.T, expected string, lsn transport.Listener) {
|
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"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.
|
// Handle registers the handler for the given pattern.
|
@ -10,7 +10,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"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"
|
maddr "github.com/micro/go-micro/v3/util/addr"
|
||||||
mnet "github.com/micro/go-micro/v3/util/net"
|
mnet "github.com/micro/go-micro/v3/util/net"
|
||||||
)
|
)
|
@ -4,7 +4,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMemoryTransport(t *testing.T) {
|
func TestMemoryTransport(t *testing.T) {
|
@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"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"
|
||||||
"github.com/micro/go-micro/v3/network/tunnel/mucp"
|
"github.com/micro/go-micro/v3/network/tunnel/mucp"
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"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 {
|
type link struct {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"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"
|
"github.com/micro/go-micro/v3/network/tunnel"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"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"
|
"github.com/micro/go-micro/v3/network/tunnel"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
"github.com/micro/go-micro/v3/transport/grpc"
|
"github.com/micro/go-micro/v3/network/transport/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package transport
|
package transport
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ package transport
|
|||||||
import (
|
import (
|
||||||
"context"
|
"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"
|
||||||
"github.com/micro/go-micro/v3/network/tunnel/mucp"
|
"github.com/micro/go-micro/v3/network/tunnel/mucp"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -10,13 +10,13 @@ import (
|
|||||||
gcli "github.com/micro/go-micro/v3/client/grpc"
|
gcli "github.com/micro/go-micro/v3/client/grpc"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/micro/go-micro/v3/errors"
|
||||||
pberr "github.com/micro/go-micro/v3/errors/proto"
|
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"
|
rmemory "github.com/micro/go-micro/v3/registry/memory"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/micro/go-micro/v3/router"
|
||||||
rtreg "github.com/micro/go-micro/v3/router/registry"
|
rtreg "github.com/micro/go-micro/v3/router/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/micro/go-micro/v3/server"
|
||||||
gsrv "github.com/micro/go-micro/v3/server/grpc"
|
gsrv "github.com/micro/go-micro/v3/server/grpc"
|
||||||
pb "github.com/micro/go-micro/v3/server/grpc/proto"
|
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"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
@ -3,9 +3,9 @@ package mucp
|
|||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/broker/http"
|
"github.com/micro/go-micro/v3/broker/http"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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/registry/mdns"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/micro/go-micro/v3/server"
|
||||||
thttp "github.com/micro/go-micro/v3/transport/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func newOptions(opt ...server.Option) server.Options {
|
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/jsonrpc"
|
||||||
"github.com/micro/go-micro/v3/codec/proto"
|
"github.com/micro/go-micro/v3/codec/proto"
|
||||||
"github.com/micro/go-micro/v3/codec/protorpc"
|
"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/oxtoacart/bpool"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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
|
// testCodec is a dummy codec that only knows how to encode nil bodies
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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"
|
"github.com/micro/go-micro/v3/util/buf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"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 {
|
type rpcResponse struct {
|
||||||
|
@ -17,9 +17,9 @@ import (
|
|||||||
raw "github.com/micro/go-micro/v3/codec/bytes"
|
raw "github.com/micro/go-micro/v3/codec/bytes"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/micro/go-micro/v3/logger"
|
||||||
"github.com/micro/go-micro/v3/metadata"
|
"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/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"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/addr"
|
||||||
"github.com/micro/go-micro/v3/util/backoff"
|
"github.com/micro/go-micro/v3/util/backoff"
|
||||||
mnet "github.com/micro/go-micro/v3/util/net"
|
mnet "github.com/micro/go-micro/v3/util/net"
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"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/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/micro/go-micro/v3/server"
|
||||||
"github.com/micro/go-micro/v3/transport"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -11,10 +11,10 @@ import (
|
|||||||
"github.com/micro/go-micro/v3/broker/http"
|
"github.com/micro/go-micro/v3/broker/http"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/micro/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/debug/trace"
|
"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"
|
||||||
"github.com/micro/go-micro/v3/registry/mdns"
|
"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 {
|
type Options struct {
|
||||||
|
@ -8,12 +8,12 @@ import (
|
|||||||
bmemory "github.com/micro/go-micro/v3/broker/memory"
|
bmemory "github.com/micro/go-micro/v3/broker/memory"
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/micro/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/client/grpc"
|
"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"
|
rmemory "github.com/micro/go-micro/v3/registry/memory"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/micro/go-micro/v3/router"
|
||||||
rtreg "github.com/micro/go-micro/v3/router/registry"
|
rtreg "github.com/micro/go-micro/v3/router/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/micro/go-micro/v3/server"
|
||||||
grpcsrv "github.com/micro/go-micro/v3/server/grpc"
|
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"
|
cw "github.com/micro/go-micro/v3/util/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ package io
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rwc struct {
|
type rwc struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pool struct {
|
type pool struct {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
"github.com/micro/go-micro/v3/transport/memory"
|
"github.com/micro/go-micro/v3/network/transport/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testPool(t *testing.T, size int, ttl time.Duration) {
|
func testPool(t *testing.T, size int, ttl time.Duration) {
|
||||||
|
@ -3,7 +3,7 @@ package pool
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
@ -4,7 +4,7 @@ package pool
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Pool is an interface for connection pooling
|
// Pool is an interface for connection pooling
|
||||||
|
@ -4,7 +4,7 @@ package socket
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/transport"
|
"github.com/micro/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Socket is our pseudo socket for transport.Socket
|
// Socket is our pseudo socket for transport.Socket
|
||||||
|
Loading…
Reference in New Issue
Block a user