v3 refactor (#1868)
* Move to v3 Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
@@ -6,15 +6,15 @@ import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
maddr "github.com/micro/go-micro/v2/util/addr"
|
||||
mnet "github.com/micro/go-micro/v2/util/net"
|
||||
mls "github.com/micro/go-micro/v2/util/tls"
|
||||
"github.com/micro/go-micro/v3/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"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
|
||||
pb "github.com/micro/go-micro/v2/transport/grpc/proto"
|
||||
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
|
||||
)
|
||||
|
||||
type grpcTransport struct {
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
)
|
||||
|
||||
func expectedPort(t *testing.T, expected string, lsn transport.Listener) {
|
||||
|
@@ -3,10 +3,10 @@ package grpc
|
||||
import (
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/micro/go-micro/v2/errors"
|
||||
"github.com/micro/go-micro/v2/logger"
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
pb "github.com/micro/go-micro/v2/transport/grpc/proto"
|
||||
"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"
|
||||
"google.golang.org/grpc/peer"
|
||||
)
|
||||
|
||||
|
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
import (
|
||||
context "context"
|
||||
api "github.com/micro/go-micro/v2/api"
|
||||
client "github.com/micro/go-micro/v2/client"
|
||||
server "github.com/micro/go-micro/v2/server"
|
||||
api "github.com/micro/go-micro/v3/api"
|
||||
client "github.com/micro/go-micro/v3/client"
|
||||
server "github.com/micro/go-micro/v3/server"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
pb "github.com/micro/go-micro/v2/transport/grpc/proto"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
pb "github.com/micro/go-micro/v3/transport/grpc/proto"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
)
|
||||
|
||||
// NewTransport returns a new http transport using net/http and supporting http2
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
)
|
||||
|
||||
func call(b *testing.B, c int) {
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
)
|
||||
|
||||
// Handle registers the handler for the given pattern.
|
||||
|
@@ -13,10 +13,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
maddr "github.com/micro/go-micro/v2/util/addr"
|
||||
"github.com/micro/go-micro/v2/util/buf"
|
||||
mnet "github.com/micro/go-micro/v2/util/net"
|
||||
mls "github.com/micro/go-micro/v2/util/tls"
|
||||
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"
|
||||
mls "github.com/micro/go-micro/v3/util/tls"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/h2c"
|
||||
)
|
||||
|
@@ -10,9 +10,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
maddr "github.com/micro/go-micro/v2/util/addr"
|
||||
mnet "github.com/micro/go-micro/v2/util/net"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
maddr "github.com/micro/go-micro/v3/util/addr"
|
||||
mnet "github.com/micro/go-micro/v3/util/net"
|
||||
)
|
||||
|
||||
type memorySocket struct {
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
)
|
||||
|
||||
func TestMemoryTransport(t *testing.T) {
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/codec"
|
||||
"github.com/micro/go-micro/v3/codec"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
|
@@ -8,8 +8,8 @@ import (
|
||||
"time"
|
||||
|
||||
quic "github.com/lucas-clemente/quic-go"
|
||||
"github.com/micro/go-micro/v2/transport"
|
||||
utls "github.com/micro/go-micro/v2/util/tls"
|
||||
"github.com/micro/go-micro/v3/transport"
|
||||
utls "github.com/micro/go-micro/v3/util/tls"
|
||||
)
|
||||
|
||||
type quicSocket struct {
|
||||
|
Reference in New Issue
Block a user