fix import paths for v2 release

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-01-30 14:39:00 +03:00
parent 2b1e0a6fd6
commit f23638c036
347 changed files with 864 additions and 820 deletions

View File

@@ -5,7 +5,7 @@ import (
"context"
"time"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/v2/codec"
)
// Client is the interface used to make requests to services.

View File

@@ -1,7 +1,7 @@
package client
import (
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
var (

View File

@@ -9,8 +9,8 @@ import (
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
jsoniter "github.com/json-iterator/go"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/codec/bytes"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/codec/bytes"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
)

View File

@@ -1,7 +1,7 @@
package grpc
import (
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/v2/errors"
"google.golang.org/grpc/status"
)

View File

@@ -9,13 +9,13 @@ import (
"sync"
"time"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/client/selector"
raw "github.com/micro/go-micro/codec/bytes"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/client/selector"
raw "github.com/micro/go-micro/v2/codec/bytes"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/metadata"
"github.com/micro/go-micro/v2/registry"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

View File

@@ -5,10 +5,10 @@ import (
"net"
"testing"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/memory"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/memory"
pgrpc "google.golang.org/grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld"
)

View File

@@ -1,7 +1,7 @@
package grpc
import (
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/v2/client"
)
type grpcEvent struct {

View File

@@ -5,7 +5,7 @@ import (
"context"
"crypto/tls"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/v2/client"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
)

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/codec"
)
type grpcRequest struct {

View File

@@ -3,8 +3,8 @@ package grpc
import (
"strings"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/codec/bytes"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/codec/bytes"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
)

View File

@@ -5,7 +5,7 @@ import (
"io"
"sync"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/v2/client"
"google.golang.org/grpc"
)

View File

@@ -2,7 +2,7 @@
package mucp
import (
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/v2/client"
)
// NewClient returns a new micro client interface

View File

@@ -4,11 +4,11 @@ import (
"context"
"time"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/transport"
)
type Options struct {

View File

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

View File

@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/v2/errors"
)
// note that returning either false or a non-nil error will result in the call not being retried

View File

@@ -9,16 +9,16 @@ import (
"time"
"github.com/google/uuid"
"github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/codec"
raw "github.com/micro/go-micro/codec/bytes"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/util/buf"
"github.com/micro/go-micro/util/pool"
"github.com/micro/go-micro/v2/broker"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/codec"
raw "github.com/micro/go-micro/v2/codec/bytes"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/metadata"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/transport"
"github.com/micro/go-micro/v2/util/buf"
"github.com/micro/go-micro/v2/util/pool"
)
type rpcClient struct {

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"testing"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/memory"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/memory"
)
func newTestRegistry() registry.Registry {

View File

@@ -4,16 +4,16 @@ import (
"bytes"
errs "errors"
"github.com/micro/go-micro/codec"
raw "github.com/micro/go-micro/codec/bytes"
"github.com/micro/go-micro/codec/grpc"
"github.com/micro/go-micro/codec/json"
"github.com/micro/go-micro/codec/jsonrpc"
"github.com/micro/go-micro/codec/proto"
"github.com/micro/go-micro/codec/protorpc"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/v2/codec"
raw "github.com/micro/go-micro/v2/codec/bytes"
"github.com/micro/go-micro/v2/codec/grpc"
"github.com/micro/go-micro/v2/codec/json"
"github.com/micro/go-micro/v2/codec/jsonrpc"
"github.com/micro/go-micro/v2/codec/proto"
"github.com/micro/go-micro/v2/codec/protorpc"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/transport"
)
const (

View File

@@ -1,7 +1,7 @@
package client
import (
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/v2/codec"
)
type rpcRequest struct {

View File

@@ -1,8 +1,8 @@
package client
import (
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/transport"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/transport"
)
type rpcResponse struct {

View File

@@ -5,7 +5,7 @@ import (
"io"
"sync"
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/v2/codec"
)
// Implements the streamer interface

View File

@@ -1,7 +1,7 @@
package selector
import (
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
var (

View File

@@ -3,8 +3,8 @@ package selector
import (
"time"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/cache"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/cache"
)
type registrySelector struct {

View File

@@ -3,7 +3,7 @@ package selector
import (
"testing"
"github.com/micro/go-micro/registry/memory"
"github.com/micro/go-micro/v2/registry/memory"
)
func TestRegistrySelector(t *testing.T) {

View File

@@ -6,8 +6,8 @@ import (
"net"
"strconv"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/registry"
)
type dnsSelector struct {

View File

@@ -1,7 +1,7 @@
package selector
import (
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
// FilterEndpoint is an endpoint based Select Filter which will

View File

@@ -3,7 +3,7 @@ package selector
import (
"testing"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
func TestFilterEndpoint(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package selector
import (
"context"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
type Options struct {

View File

@@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/v2/client/selector"
)
// Set the registry cache ttl

View File

@@ -2,7 +2,7 @@
package registry
import (
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/v2/client/selector"
)
// NewSelector returns a new registry selector

View File

@@ -7,11 +7,11 @@ import (
"sort"
"sync"
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/router"
pb "github.com/micro/go-micro/router/service/proto"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/router"
pb "github.com/micro/go-micro/v2/router/service/proto"
)
type routerSelector struct {

View File

@@ -4,7 +4,7 @@ package selector
import (
"errors"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
// Selector builds on the registry as a mechanism to pick nodes

View File

@@ -2,8 +2,8 @@
package static
import (
"github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/client/selector"
"github.com/micro/go-micro/v2/registry"
)
// staticSelector is a static selector

View File

@@ -5,7 +5,7 @@ import (
"sync"
"time"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
func init() {

View File

@@ -3,7 +3,7 @@ package selector
import (
"testing"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
func TestStrategies(t *testing.T) {

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/micro/go-micro/client/proto/client.proto
// source: github.com/micro/go-micro/v2/client/proto/client.proto
package go_micro_client
@@ -184,7 +184,7 @@ func init() {
}
func init() {
proto.RegisterFile("github.com/micro/go-micro/client/proto/client.proto", fileDescriptor_d418333f021a3308)
proto.RegisterFile("github.com/micro/go-micro/v2/client/proto/client.proto", fileDescriptor_d418333f021a3308)
}
var fileDescriptor_d418333f021a3308 = []byte{

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: github.com/micro/go-micro/client/proto/client.proto
// source: github.com/micro/go-micro/v2/client/proto/client.proto
package go_micro_client
@@ -11,8 +11,8 @@ import (
import (
context "context"
client "github.com/micro/go-micro/client"
server "github.com/micro/go-micro/server"
client "github.com/micro/go-micro/v2/client"
server "github.com/micro/go-micro/v2/server"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/v2/registry"
)
// CallFunc represents the individual call func