rename imports to asim/go-micro (#2051)

This commit is contained in:
Asim Aslam
2020-10-20 10:15:39 +01:00
committed by GitHub
parent 1ee348109e
commit b508565a78
265 changed files with 673 additions and 673 deletions

View File

@@ -1,6 +1,6 @@
# GRPC Server
The grpc server is a [micro.Server](https://godoc.org/github.com/micro/go-micro/server#Server) compatible server.
The grpc server is a [micro.Server](https://godoc.org/github.com/asim/go-micro/server#Server) compatible server.
## Overview
@@ -13,7 +13,7 @@ Specify the server to your micro service
```go
import (
"github.com/micro/go-micro"
"github.com/asim/go-micro"
"github.com/micro/go-plugins/server/grpc"
)

View File

@@ -6,10 +6,10 @@ import (
b "bytes"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/codec/bytes"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/codec/bytes"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
"google.golang.org/grpc/metadata"

View File

@@ -3,7 +3,7 @@ package grpc
import (
"context"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/server"
)
func setServerOption(k, v interface{}) server.Option {

View File

@@ -3,7 +3,7 @@ package grpc
import (
"net/http"
"github.com/micro/go-micro/v3/errors"
"github.com/asim/go-micro/v3/errors"
"google.golang.org/grpc/codes"
)

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/micro/go-micro/v3/registry"
"github.com/asim/go-micro/v3/registry"
)
func extractValue(v reflect.Type, d int) *registry.Value {

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/micro/go-micro/v3/registry"
"github.com/asim/go-micro/v3/registry"
)
type testHandler struct{}

View File

@@ -14,18 +14,18 @@ import (
"sync"
"time"
"github.com/asim/go-micro/v3/broker"
"github.com/asim/go-micro/v3/errors"
pberr "github.com/asim/go-micro/v3/errors/proto"
"github.com/asim/go-micro/v3/logger"
meta "github.com/asim/go-micro/v3/metadata"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
"github.com/asim/go-micro/v3/util/addr"
"github.com/asim/go-micro/v3/util/backoff"
mgrpc "github.com/asim/go-micro/v3/util/grpc"
mnet "github.com/asim/go-micro/v3/util/net"
"github.com/golang/protobuf/proto"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/errors"
pberr "github.com/micro/go-micro/v3/errors/proto"
"github.com/micro/go-micro/v3/logger"
meta "github.com/micro/go-micro/v3/metadata"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/micro/go-micro/v3/util/addr"
"github.com/micro/go-micro/v3/util/backoff"
mgrpc "github.com/micro/go-micro/v3/util/grpc"
mnet "github.com/micro/go-micro/v3/util/net"
"golang.org/x/net/netutil"
"google.golang.org/grpc"

View File

@@ -5,18 +5,18 @@ import (
"fmt"
"testing"
bmemory "github.com/micro/go-micro/v3/broker/memory"
"github.com/micro/go-micro/v3/client"
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"
bmemory "github.com/asim/go-micro/v3/broker/memory"
"github.com/asim/go-micro/v3/client"
gcli "github.com/asim/go-micro/v3/client/grpc"
"github.com/asim/go-micro/v3/errors"
pberr "github.com/asim/go-micro/v3/errors/proto"
tgrpc "github.com/asim/go-micro/v3/network/transport/grpc"
rmemory "github.com/asim/go-micro/v3/registry/memory"
"github.com/asim/go-micro/v3/router"
rtreg "github.com/asim/go-micro/v3/router/registry"
"github.com/asim/go-micro/v3/server"
gsrv "github.com/asim/go-micro/v3/server/grpc"
pb "github.com/asim/go-micro/v3/server/grpc/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
)

View File

@@ -3,8 +3,8 @@ package grpc
import (
"reflect"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
type rpcHandler struct {

View File

@@ -5,10 +5,10 @@ import (
"crypto/tls"
"net"
"github.com/micro/go-micro/v3/broker/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/registry/mdns"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/broker/http"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/registry/mdns"
"github.com/asim/go-micro/v3/server"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
)

View File

@@ -12,9 +12,9 @@ import (
import (
context "context"
api "github.com/micro/go-micro/v3/api"
client "github.com/micro/go-micro/v3/client"
server "github.com/micro/go-micro/v3/server"
api "github.com/asim/go-micro/v3/api"
client "github.com/asim/go-micro/v3/client"
server "github.com/asim/go-micro/v3/server"
)
// Reference imports to suppress errors if they are not otherwise used.

View File

@@ -1,8 +1,8 @@
package grpc
import (
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/codec/bytes"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/codec/bytes"
)
type rpcRequest struct {

View File

@@ -1,7 +1,7 @@
package grpc
import (
"github.com/micro/go-micro/v3/codec"
"github.com/asim/go-micro/v3/codec"
)
type rpcResponse struct {

View File

@@ -14,8 +14,8 @@ import (
"unicode"
"unicode/utf8"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/logger"
"github.com/asim/go-micro/v3/server"
)
var (

View File

@@ -3,7 +3,7 @@ package grpc
import (
"context"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/server"
"google.golang.org/grpc"
)

View File

@@ -7,12 +7,12 @@ import (
"runtime/debug"
"strings"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/logger"
"github.com/micro/go-micro/v3/metadata"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/broker"
"github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/logger"
"github.com/asim/go-micro/v3/metadata"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
const (

View File

@@ -4,8 +4,8 @@ import (
"errors"
"sync"
"github.com/asim/go-micro/v3/server"
"github.com/google/uuid"
"github.com/micro/go-micro/v3/server"
)
type MockServer struct {

View File

@@ -1,8 +1,8 @@
package mock
import (
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
type MockHandler struct {

View File

@@ -1,8 +1,8 @@
package mock
import (
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
type MockSubscriber struct {

View File

@@ -3,7 +3,7 @@ package mock
import (
"testing"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/server"
)
func TestMockServer(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/micro/go-micro/v3/registry"
"github.com/asim/go-micro/v3/registry"
)
func extractValue(v reflect.Type, d int) *registry.Value {

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/micro/go-micro/v3/registry"
"github.com/asim/go-micro/v3/registry"
)
type testHandler struct{}

View File

@@ -2,7 +2,7 @@
package mucp
import (
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/server"
)
var (

View File

@@ -1,11 +1,11 @@
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"
"github.com/asim/go-micro/v3/broker/http"
"github.com/asim/go-micro/v3/codec"
thttp "github.com/asim/go-micro/v3/network/transport/http"
"github.com/asim/go-micro/v3/registry/mdns"
"github.com/asim/go-micro/v3/server"
)
func newOptions(opt ...server.Option) server.Options {

View File

@@ -4,14 +4,14 @@ import (
"bytes"
"sync"
"github.com/micro/go-micro/v3/codec"
raw "github.com/micro/go-micro/v3/codec/bytes"
"github.com/micro/go-micro/v3/codec/grpc"
"github.com/micro/go-micro/v3/codec/json"
"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/network/transport"
"github.com/asim/go-micro/v3/codec"
raw "github.com/asim/go-micro/v3/codec/bytes"
"github.com/asim/go-micro/v3/codec/grpc"
"github.com/asim/go-micro/v3/codec/json"
"github.com/asim/go-micro/v3/codec/jsonrpc"
"github.com/asim/go-micro/v3/codec/proto"
"github.com/asim/go-micro/v3/codec/protorpc"
"github.com/asim/go-micro/v3/network/transport"
"github.com/oxtoacart/bpool"
"github.com/pkg/errors"
)

View File

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

View File

@@ -3,8 +3,8 @@ package mucp
import (
"reflect"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
type rpcHandler struct {

View File

@@ -3,9 +3,9 @@ package mucp
import (
"bytes"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/network/transport"
"github.com/micro/go-micro/v3/util/buf"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/network/transport"
"github.com/asim/go-micro/v3/util/buf"
)
type rpcRequest struct {

View File

@@ -3,8 +3,8 @@ package mucp
import (
"net/http"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/network/transport"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/network/transport"
)
type rpcResponse struct {

View File

@@ -18,9 +18,9 @@ import (
"unicode"
"unicode/utf8"
"github.com/micro/go-micro/v3/codec"
merrors "github.com/micro/go-micro/v3/errors"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/codec"
merrors "github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/server"
)
var (

View File

@@ -12,18 +12,18 @@ import (
"sync"
"time"
"github.com/micro/go-micro/v3/broker"
"github.com/micro/go-micro/v3/codec"
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/util/addr"
"github.com/micro/go-micro/v3/util/backoff"
mnet "github.com/micro/go-micro/v3/util/net"
"github.com/micro/go-micro/v3/util/socket"
"github.com/asim/go-micro/v3/broker"
"github.com/asim/go-micro/v3/codec"
raw "github.com/asim/go-micro/v3/codec/bytes"
"github.com/asim/go-micro/v3/logger"
"github.com/asim/go-micro/v3/metadata"
"github.com/asim/go-micro/v3/network/transport"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
"github.com/asim/go-micro/v3/util/addr"
"github.com/asim/go-micro/v3/util/backoff"
mnet "github.com/asim/go-micro/v3/util/net"
"github.com/asim/go-micro/v3/util/socket"
)
type rpcServer struct {

View File

@@ -6,8 +6,8 @@ import (
"io"
"sync"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/server"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/server"
)
// Implements the Streamer interface

View File

@@ -9,9 +9,9 @@ import (
"testing"
"time"
"github.com/asim/go-micro/v3/codec/json"
protoCodec "github.com/asim/go-micro/v3/codec/proto"
"github.com/golang/protobuf/proto"
"github.com/micro/go-micro/v3/codec/json"
protoCodec "github.com/micro/go-micro/v3/codec/proto"
)
// protoStruct implements proto.Message

View File

@@ -4,10 +4,10 @@ import (
"fmt"
"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/asim/go-micro/v3/broker"
"github.com/asim/go-micro/v3/network/transport"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)
const (

View File

@@ -6,15 +6,15 @@ import (
"sync"
"time"
"github.com/micro/go-micro/v3/auth"
"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/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/asim/go-micro/v3/auth"
"github.com/asim/go-micro/v3/broker"
"github.com/asim/go-micro/v3/broker/http"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/debug/trace"
"github.com/asim/go-micro/v3/network/transport"
thttp "github.com/asim/go-micro/v3/network/transport/http"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/registry/mdns"
)
type Options struct {

View File

@@ -5,9 +5,9 @@ import (
"context"
"time"
"github.com/asim/go-micro/v3/codec"
"github.com/asim/go-micro/v3/registry"
"github.com/google/uuid"
"github.com/micro/go-micro/v3/codec"
"github.com/micro/go-micro/v3/registry"
)
// Server is a simple micro server abstraction