rename imports to asim/go-micro (#2051)
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/acme"
|
"github.com/asim/go-micro/v3/acme"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/asim/go-micro/v3/logger"
|
||||||
"golang.org/x/crypto/acme/autocert"
|
"golang.org/x/crypto/acme/autocert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/asim/go-micro/v3/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Gateway is an api gateway interface
|
// Gateway is an api gateway interface
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api"
|
"github.com/asim/go-micro/v3/api"
|
||||||
"github.com/micro/go-micro/v3/api/handler"
|
"github.com/asim/go-micro/v3/api/handler"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api/handler"
|
"github.com/asim/go-micro/v3/api/handler"
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
rpath "github.com/micro/go-micro/v3/api/resolver/path"
|
rpath "github.com/asim/go-micro/v3/api/resolver/path"
|
||||||
"github.com/micro/go-micro/v3/api/router"
|
"github.com/asim/go-micro/v3/api/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/api/router/registry"
|
regRouter "github.com/asim/go-micro/v3/api/router/registry"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/memory"
|
"github.com/asim/go-micro/v3/registry/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testHttp(t *testing.T, path, service, ns string) {
|
func testHttp(t *testing.T, path, service, ns string) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package handler
|
package handler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/api/router"
|
"github.com/asim/go-micro/v3/api/router"
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/client/grpc"
|
"github.com/asim/go-micro/v3/client/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/api"
|
||||||
|
"github.com/asim/go-micro/v3/api/handler"
|
||||||
|
"github.com/asim/go-micro/v3/api/handler/rpc/proto"
|
||||||
|
"github.com/asim/go-micro/v3/client"
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
|
"github.com/asim/go-micro/v3/codec/jsonrpc"
|
||||||
|
"github.com/asim/go-micro/v3/codec/protorpc"
|
||||||
|
"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/util/ctx"
|
||||||
|
"github.com/asim/go-micro/v3/util/qson"
|
||||||
|
"github.com/asim/go-micro/v3/util/router"
|
||||||
jsonpatch "github.com/evanphx/json-patch/v5"
|
jsonpatch "github.com/evanphx/json-patch/v5"
|
||||||
"github.com/micro/go-micro/v3/api"
|
|
||||||
"github.com/micro/go-micro/v3/api/handler"
|
|
||||||
"github.com/micro/go-micro/v3/api/handler/rpc/proto"
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
"github.com/micro/go-micro/v3/codec/jsonrpc"
|
|
||||||
"github.com/micro/go-micro/v3/codec/protorpc"
|
|
||||||
"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/util/ctx"
|
|
||||||
"github.com/micro/go-micro/v3/util/qson"
|
|
||||||
"github.com/micro/go-micro/v3/util/router"
|
|
||||||
"github.com/oxtoacart/bpool"
|
"github.com/oxtoacart/bpool"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/api"
|
||||||
|
"github.com/asim/go-micro/v3/client"
|
||||||
|
raw "github.com/asim/go-micro/v3/codec/bytes"
|
||||||
|
"github.com/asim/go-micro/v3/logger"
|
||||||
|
"github.com/asim/go-micro/v3/util/router"
|
||||||
"github.com/gobwas/httphead"
|
"github.com/gobwas/httphead"
|
||||||
"github.com/gobwas/ws"
|
"github.com/gobwas/ws"
|
||||||
"github.com/gobwas/ws/wsutil"
|
"github.com/gobwas/ws/wsutil"
|
||||||
"github.com/micro/go-micro/v3/api"
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
|
||||||
raw "github.com/micro/go-micro/v3/codec/bytes"
|
|
||||||
"github.com/micro/go-micro/v3/logger"
|
|
||||||
"github.com/micro/go-micro/v3/util/router"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// serveWebsocket will stream rpc back over websockets assuming json
|
// serveWebsocket will stream rpc back over websockets assuming json
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api"
|
"github.com/asim/go-micro/v3/api"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/asim/go-micro/v3/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type httpServer struct {
|
type httpServer struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package api
|
|||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/acme"
|
"github.com/asim/go-micro/v3/acme"
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct {
|
type Resolver struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package host
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct {
|
type Resolver struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package resolver
|
package resolver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Resolver struct {
|
type Resolver struct {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package router
|
package router
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/api/resolver"
|
"github.com/asim/go-micro/v3/api/resolver"
|
||||||
"github.com/micro/go-micro/v3/api/resolver/path"
|
"github.com/asim/go-micro/v3/api/resolver/path"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/mdns"
|
"github.com/asim/go-micro/v3/registry/mdns"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api"
|
"github.com/asim/go-micro/v3/api"
|
||||||
"github.com/micro/go-micro/v3/api/router"
|
"github.com/asim/go-micro/v3/api/router"
|
||||||
"github.com/micro/go-micro/v3/logger"
|
"github.com/asim/go-micro/v3/logger"
|
||||||
"github.com/micro/go-micro/v3/metadata"
|
"github.com/asim/go-micro/v3/metadata"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/cache"
|
"github.com/asim/go-micro/v3/registry/cache"
|
||||||
util "github.com/micro/go-micro/v3/util/router"
|
util "github.com/asim/go-micro/v3/util/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
// endpoint struct, that holds compiled pcre
|
// endpoint struct, that holds compiled pcre
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package registry
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ package router
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api"
|
"github.com/asim/go-micro/v3/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Router is used to determine an endpoint for a request
|
// Router is used to determine an endpoint for a request
|
||||||
|
|||||||
@@ -9,18 +9,18 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/api/handler"
|
"github.com/asim/go-micro/v3/api/handler"
|
||||||
"github.com/micro/go-micro/v3/api/handler/rpc"
|
"github.com/asim/go-micro/v3/api/handler/rpc"
|
||||||
"github.com/micro/go-micro/v3/api/router"
|
"github.com/asim/go-micro/v3/api/router"
|
||||||
rregistry "github.com/micro/go-micro/v3/api/router/registry"
|
rregistry "github.com/asim/go-micro/v3/api/router/registry"
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
gcli "github.com/micro/go-micro/v3/client/grpc"
|
gcli "github.com/asim/go-micro/v3/client/grpc"
|
||||||
rmemory "github.com/micro/go-micro/v3/registry/memory"
|
rmemory "github.com/asim/go-micro/v3/registry/memory"
|
||||||
rt "github.com/micro/go-micro/v3/router"
|
rt "github.com/asim/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
regRouter "github.com/asim/go-micro/v3/router/registry"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/asim/go-micro/v3/server"
|
||||||
gsrv "github.com/micro/go-micro/v3/server/grpc"
|
gsrv "github.com/asim/go-micro/v3/server/grpc"
|
||||||
pb "github.com/micro/go-micro/v3/server/grpc/proto"
|
pb "github.com/asim/go-micro/v3/server/grpc/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// server is used to implement helloworld.GreeterServer.
|
// server is used to implement helloworld.GreeterServer.
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/auth"
|
"github.com/asim/go-micro/v3/auth"
|
||||||
"github.com/micro/go-micro/v3/util/token"
|
"github.com/asim/go-micro/v3/util/token"
|
||||||
"github.com/micro/go-micro/v3/util/token/jwt"
|
"github.com/asim/go-micro/v3/util/token/jwt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewAuth returns a new instance of the Auth service
|
// NewAuth returns a new instance of the Auth service
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package noop
|
package noop
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/asim/go-micro/v3/auth"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/auth"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewAuth(opts ...auth.Option) auth.Auth {
|
func NewAuth(opts ...auth.Option) auth.Auth {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/store"
|
"github.com/asim/go-micro/v3/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewOptions(opts ...Option) Options {
|
func NewOptions(opts ...Option) Options {
|
||||||
|
|||||||
@@ -17,16 +17,16 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/broker"
|
||||||
|
"github.com/asim/go-micro/v3/codec/json"
|
||||||
|
merr "github.com/asim/go-micro/v3/errors"
|
||||||
|
"github.com/asim/go-micro/v3/registry"
|
||||||
|
"github.com/asim/go-micro/v3/registry/cache"
|
||||||
|
"github.com/asim/go-micro/v3/registry/mdns"
|
||||||
|
maddr "github.com/asim/go-micro/v3/util/addr"
|
||||||
|
mnet "github.com/asim/go-micro/v3/util/net"
|
||||||
|
mls "github.com/asim/go-micro/v3/util/tls"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/broker"
|
|
||||||
"github.com/micro/go-micro/v3/codec/json"
|
|
||||||
merr "github.com/micro/go-micro/v3/errors"
|
|
||||||
"github.com/micro/go-micro/v3/registry"
|
|
||||||
"github.com/micro/go-micro/v3/registry/cache"
|
|
||||||
"github.com/micro/go-micro/v3/registry/mdns"
|
|
||||||
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"
|
|
||||||
"golang.org/x/net/http2"
|
"golang.org/x/net/http2"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/broker"
|
||||||
|
"github.com/asim/go-micro/v3/registry"
|
||||||
|
"github.com/asim/go-micro/v3/registry/memory"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/broker"
|
|
||||||
"github.com/micro/go-micro/v3/registry"
|
|
||||||
"github.com/micro/go-micro/v3/registry/memory"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"github.com/asim/go-micro/v3/broker"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handle registers the handler for the given pattern.
|
// Handle registers the handler for the given pattern.
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/broker"
|
||||||
|
maddr "github.com/asim/go-micro/v3/util/addr"
|
||||||
|
mnet "github.com/asim/go-micro/v3/util/net"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/broker"
|
|
||||||
maddr "github.com/micro/go-micro/v3/util/addr"
|
|
||||||
mnet "github.com/micro/go-micro/v3/util/net"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type memoryBroker struct {
|
type memoryBroker struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"github.com/asim/go-micro/v3/broker"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMemoryBroker(t *testing.T) {
|
func TestMemoryBroker(t *testing.T) {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/build"
|
"github.com/asim/go-micro/v3/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
type goBuild struct {
|
type goBuild struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/build"
|
"github.com/asim/go-micro/v3/build"
|
||||||
)
|
)
|
||||||
|
|
||||||
type tarBuild struct{}
|
type tarBuild struct{}
|
||||||
|
|||||||
4
cache/memory/memory.go
vendored
4
cache/memory/memory.go
vendored
@@ -4,8 +4,8 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/cache"
|
"github.com/asim/go-micro/v3/cache"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memoryCache struct {
|
type memoryCache struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/util/backoff"
|
"github.com/asim/go-micro/v3/util/backoff"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BackoffFunc func(ctx context.Context, req Request, attempts int) (time.Duration, error)
|
type BackoffFunc func(ctx context.Context, req Request, attempts int) (time.Duration, error)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBackoff(t *testing.T) {
|
func TestBackoff(t *testing.T) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client is the interface used to make requests to services.
|
// Client is the interface used to make requests to services.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# GRPC Client
|
# GRPC Client
|
||||||
|
|
||||||
The grpc client is a [micro.Client](https://godoc.org/github.com/micro/go-micro/client#Client) compatible client.
|
The grpc client is a [micro.Client](https://godoc.org/github.com/asim/go-micro/client#Client) compatible client.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ Specify the client to your micro service
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro"
|
"github.com/asim/go-micro"
|
||||||
"github.com/micro/go-plugins/client/grpc"
|
"github.com/micro/go-plugins/client/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
|
|
||||||
b "bytes"
|
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/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
"github.com/micro/go-micro/v3/codec/bytes"
|
|
||||||
"github.com/oxtoacart/bpool"
|
"github.com/oxtoacart/bpool"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"github.com/asim/go-micro/v3/broker"
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
raw "github.com/micro/go-micro/v3/codec/bytes"
|
raw "github.com/asim/go-micro/v3/codec/bytes"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/metadata"
|
"github.com/asim/go-micro/v3/metadata"
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials"
|
"google.golang.org/grpc/credentials"
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/memory"
|
"github.com/asim/go-micro/v3/registry/memory"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/asim/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
regRouter "github.com/asim/go-micro/v3/router/registry"
|
||||||
pgrpc "google.golang.org/grpc"
|
pgrpc "google.golang.org/grpc"
|
||||||
pb "google.golang.org/grpc/examples/helloworld/helloworld"
|
pb "google.golang.org/grpc/examples/helloworld/helloworld"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package grpc
|
package grpc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type grpcEvent struct {
|
type grpcEvent struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type grpcRequest struct {
|
type grpcRequest struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package grpc
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/codec/bytes"
|
"github.com/asim/go-micro/v3/codec/bytes"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/encoding"
|
"google.golang.org/grpc/encoding"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/asim/go-micro/v3/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LookupFunc is used to lookup routes for a service
|
// LookupFunc is used to lookup routes for a service
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mucp
|
package mucp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/broker"
|
||||||
|
"github.com/asim/go-micro/v3/client"
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
|
raw "github.com/asim/go-micro/v3/codec/bytes"
|
||||||
|
"github.com/asim/go-micro/v3/errors"
|
||||||
|
"github.com/asim/go-micro/v3/metadata"
|
||||||
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
|
"github.com/asim/go-micro/v3/util/buf"
|
||||||
|
"github.com/asim/go-micro/v3/util/pool"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/broker"
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
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/network/transport"
|
|
||||||
"github.com/micro/go-micro/v3/util/buf"
|
|
||||||
"github.com/micro/go-micro/v3/util/pool"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcClient struct {
|
type rpcClient struct {
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
errs "errors"
|
errs "errors"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
raw "github.com/micro/go-micro/v3/codec/bytes"
|
raw "github.com/asim/go-micro/v3/codec/bytes"
|
||||||
"github.com/micro/go-micro/v3/codec/grpc"
|
"github.com/asim/go-micro/v3/codec/grpc"
|
||||||
"github.com/micro/go-micro/v3/codec/json"
|
"github.com/asim/go-micro/v3/codec/json"
|
||||||
"github.com/micro/go-micro/v3/codec/jsonrpc"
|
"github.com/asim/go-micro/v3/codec/jsonrpc"
|
||||||
"github.com/micro/go-micro/v3/codec/proto"
|
"github.com/asim/go-micro/v3/codec/proto"
|
||||||
"github.com/micro/go-micro/v3/codec/protorpc"
|
"github.com/asim/go-micro/v3/codec/protorpc"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/network/transport"
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mucp
|
package mucp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type message struct {
|
type message struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package mucp
|
package mucp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcRequest struct {
|
type rpcRequest struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package mucp
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRequestOptions(t *testing.T) {
|
func TestRequestOptions(t *testing.T) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package mucp
|
package mucp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/network/transport"
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rpcResponse struct {
|
type rpcResponse struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Implements the streamer interface
|
// Implements the streamer interface
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/registry/memory"
|
"github.com/asim/go-micro/v3/registry/memory"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/asim/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
regRouter "github.com/asim/go-micro/v3/router/registry"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestRouter() router.Router {
|
func newTestRouter() router.Router {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/network/transport"
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCallOptions(t *testing.T) {
|
func TestCallOptions(t *testing.T) {
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/broker"
|
"github.com/asim/go-micro/v3/broker"
|
||||||
"github.com/micro/go-micro/v3/broker/http"
|
"github.com/asim/go-micro/v3/broker/http"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/network/transport"
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
thttp "github.com/micro/go-micro/v3/network/transport/http"
|
thttp "github.com/asim/go-micro/v3/network/transport/http"
|
||||||
"github.com/micro/go-micro/v3/registry"
|
"github.com/asim/go-micro/v3/registry"
|
||||||
"github.com/micro/go-micro/v3/router"
|
"github.com/asim/go-micro/v3/router"
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
regRouter "github.com/asim/go-micro/v3/router/registry"
|
||||||
"github.com/micro/go-micro/v3/selector"
|
"github.com/asim/go-micro/v3/selector"
|
||||||
"github.com/micro/go-micro/v3/selector/roundrobin"
|
"github.com/asim/go-micro/v3/selector/roundrobin"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/errors"
|
"github.com/asim/go-micro/v3/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// note that returning either false or a non-nil error will result in the call not being retried
|
// note that returning either false or a non-nil error will result in the call not being retried
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package bytes
|
package bytes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Marshaler struct{}
|
type Marshaler struct{}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/codec/bytes"
|
"github.com/asim/go-micro/v3/codec/bytes"
|
||||||
"github.com/micro/go-micro/v3/codec/grpc"
|
"github.com/asim/go-micro/v3/codec/grpc"
|
||||||
"github.com/micro/go-micro/v3/codec/json"
|
"github.com/asim/go-micro/v3/codec/json"
|
||||||
"github.com/micro/go-micro/v3/codec/jsonrpc"
|
"github.com/asim/go-micro/v3/codec/jsonrpc"
|
||||||
"github.com/micro/go-micro/v3/codec/proto"
|
"github.com/asim/go-micro/v3/codec/proto"
|
||||||
"github.com/micro/go-micro/v3/codec/protorpc"
|
"github.com/asim/go-micro/v3/codec/protorpc"
|
||||||
"github.com/micro/go-micro/v3/codec/text"
|
"github.com/asim/go-micro/v3/codec/text"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testRWC struct{}
|
type testRWC struct{}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/golang/protobuf/jsonpb"
|
"github.com/golang/protobuf/jsonpb"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type clientCodec struct {
|
type clientCodec struct {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type jsonCodec struct {
|
type jsonCodec struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type serverCodec struct {
|
type serverCodec struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package proto
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
"github.com/oxtoacart/bpool"
|
"github.com/oxtoacart/bpool"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type flusher interface {
|
type flusher interface {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Codec struct {
|
type Codec struct {
|
||||||
|
|||||||
2
config/env/env.go
vendored
2
config/env/env.go
vendored
@@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/config"
|
"github.com/asim/go-micro/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type envConfig struct{}
|
type envConfig struct{}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/config"
|
"github.com/asim/go-micro/v3/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewSecrets returns a config that encrypts values at rest
|
// NewSecrets returns a config that encrypts values at rest
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/config"
|
"github.com/asim/go-micro/v3/config"
|
||||||
"github.com/micro/go-micro/v3/store"
|
"github.com/asim/go-micro/v3/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewConfig returns new config
|
// NewConfig returns new config
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/config"
|
"github.com/asim/go-micro/v3/config"
|
||||||
"github.com/micro/go-micro/v3/config/secrets"
|
"github.com/asim/go-micro/v3/config/secrets"
|
||||||
"github.com/micro/go-micro/v3/store/memory"
|
"github.com/asim/go-micro/v3/store/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
type conf1 struct {
|
type conf1 struct {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Package kubernetes is a logger implementing (github.com/micro/go-micro/v3/debug/log).Log
|
// Package kubernetes is a logger implementing (github.com/asim/go-micro/v3/debug/log).Log
|
||||||
package kubernetes
|
package kubernetes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
"github.com/micro/go-micro/v3/util/kubernetes/client"
|
"github.com/asim/go-micro/v3/util/kubernetes/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type klog struct {
|
type klog struct {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func write(l log.Record) error {
|
func write(l log.Record) error {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ package memory
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
"github.com/micro/go-micro/v3/util/ring"
|
"github.com/asim/go-micro/v3/util/ring"
|
||||||
)
|
)
|
||||||
|
|
||||||
// memoryLog is default micro log
|
// memoryLog is default micro log
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLogger(t *testing.T) {
|
func TestLogger(t *testing.T) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package memory
|
package memory
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type logStream struct {
|
type logStream struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package noop
|
package noop
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/debug/log"
|
"github.com/asim/go-micro/v3/debug/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type noop struct{}
|
type noop struct{}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"net/http/pprof"
|
"net/http/pprof"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/profile"
|
"github.com/asim/go-micro/v3/debug/profile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type httpProfile struct {
|
type httpProfile struct {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/profile"
|
"github.com/asim/go-micro/v3/debug/profile"
|
||||||
)
|
)
|
||||||
|
|
||||||
type profiler struct {
|
type profiler struct {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/debug/stats"
|
"github.com/asim/go-micro/v3/debug/stats"
|
||||||
"github.com/micro/go-micro/v3/util/ring"
|
"github.com/asim/go-micro/v3/util/ring"
|
||||||
)
|
)
|
||||||
|
|
||||||
type memoryStats struct {
|
type memoryStats struct {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/debug/trace"
|
||||||
|
"github.com/asim/go-micro/v3/util/ring"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/debug/trace"
|
|
||||||
"github.com/micro/go-micro/v3/util/ring"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Tracer struct {
|
type Tracer struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/metadata"
|
"github.com/asim/go-micro/v3/metadata"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tracer is an interface for distributed tracing
|
// Tracer is an interface for distributed tracing
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/events"
|
||||||
|
"github.com/asim/go-micro/v3/logger"
|
||||||
|
"github.com/asim/go-micro/v3/store"
|
||||||
|
"github.com/asim/go-micro/v3/store/memory"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/events"
|
|
||||||
"github.com/micro/go-micro/v3/logger"
|
|
||||||
"github.com/micro/go-micro/v3/store"
|
|
||||||
"github.com/micro/go-micro/v3/store/memory"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package events
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/store"
|
"github.com/asim/go-micro/v3/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Options which are used to configure the in-memory stream
|
// Options which are used to configure the in-memory stream
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/events"
|
"github.com/asim/go-micro/v3/events"
|
||||||
"github.com/micro/go-micro/v3/events/memory"
|
"github.com/asim/go-micro/v3/events/memory"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module github.com/micro/go-micro/v3
|
module github.com/asim/go-micro/v3
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/codec"
|
"github.com/asim/go-micro/v3/codec"
|
||||||
"github.com/micro/go-micro/v3/store"
|
"github.com/asim/go-micro/v3/store"
|
||||||
"github.com/micro/go-micro/v3/sync"
|
"github.com/asim/go-micro/v3/sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Model provides an interface for data modelling
|
// Model provides an interface for data modelling
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package mud
|
package mud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/asim/go-micro/v3/codec"
|
||||||
|
"github.com/asim/go-micro/v3/model"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/go-micro/v3/codec"
|
|
||||||
"github.com/micro/go-micro/v3/model"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type mudEntity struct {
|
type mudEntity struct {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
package mud
|
package mud
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/codec/json"
|
"github.com/asim/go-micro/v3/codec/json"
|
||||||
"github.com/micro/go-micro/v3/model"
|
"github.com/asim/go-micro/v3/model"
|
||||||
"github.com/micro/go-micro/v3/store"
|
"github.com/asim/go-micro/v3/store"
|
||||||
"github.com/micro/go-micro/v3/store/memory"
|
"github.com/asim/go-micro/v3/store/memory"
|
||||||
memsync "github.com/micro/go-micro/v3/sync/memory"
|
memsync "github.com/asim/go-micro/v3/sync/memory"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mudModel struct {
|
type mudModel struct {
|
||||||
|
|||||||
@@ -10,23 +10,23 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/asim/go-micro/v3/client"
|
||||||
|
cmucp "github.com/asim/go-micro/v3/client/mucp"
|
||||||
|
"github.com/asim/go-micro/v3/logger"
|
||||||
|
"github.com/asim/go-micro/v3/network"
|
||||||
|
pb "github.com/asim/go-micro/v3/network/mucp/proto"
|
||||||
|
"github.com/asim/go-micro/v3/network/resolver/dns"
|
||||||
|
"github.com/asim/go-micro/v3/network/transport"
|
||||||
|
"github.com/asim/go-micro/v3/network/tunnel"
|
||||||
|
bun "github.com/asim/go-micro/v3/network/tunnel/broker"
|
||||||
|
tun "github.com/asim/go-micro/v3/network/tunnel/transport"
|
||||||
|
"github.com/asim/go-micro/v3/proxy"
|
||||||
|
"github.com/asim/go-micro/v3/registry/noop"
|
||||||
|
"github.com/asim/go-micro/v3/router"
|
||||||
|
"github.com/asim/go-micro/v3/server"
|
||||||
|
smucp "github.com/asim/go-micro/v3/server/mucp"
|
||||||
|
"github.com/asim/go-micro/v3/util/backoff"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/micro/go-micro/v3/client"
|
|
||||||
cmucp "github.com/micro/go-micro/v3/client/mucp"
|
|
||||||
"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/network/resolver/dns"
|
|
||||||
"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"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/network"
|
"github.com/asim/go-micro/v3/network"
|
||||||
pb "github.com/micro/go-micro/v3/network/mucp/proto"
|
pb "github.com/asim/go-micro/v3/network/mucp/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
// nodeError tracks node errors
|
// nodeError tracks node errors
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/network"
|
"github.com/asim/go-micro/v3/network"
|
||||||
pb "github.com/micro/go-micro/v3/network/mucp/proto"
|
pb "github.com/asim/go-micro/v3/network/mucp/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.22.0
|
// protoc-gen-go v1.22.0
|
||||||
// protoc v3.11.4
|
// protoc v3.11.4
|
||||||
// source: github.com/micro/go-micro/network/mucp/proto/network.proto
|
// source: github.com/asim/go-micro/network/mucp/proto/network.proto
|
||||||
|
|
||||||
package go_micro_network_mucp
|
package go_micro_network_mucp
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||||
// source: github.com/micro/go-micro/network/mucp/proto/network.proto
|
// source: github.com/asim/go-micro/network/mucp/proto/network.proto
|
||||||
|
|
||||||
package go_micro_network_mucp
|
package go_micro_network_mucp
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/micro/go-micro/v3/client"
|
"github.com/asim/go-micro/v3/client"
|
||||||
"github.com/micro/go-micro/v3/server"
|
"github.com/asim/go-micro/v3/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Network is micro network
|
// Network is micro network
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package network
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/asim/go-micro/v3/network/tunnel"
|
||||||
|
tmucp "github.com/asim/go-micro/v3/network/tunnel/mucp"
|
||||||
|
"github.com/asim/go-micro/v3/proxy"
|
||||||
|
"github.com/asim/go-micro/v3/proxy/mucp"
|
||||||
|
"github.com/asim/go-micro/v3/router"
|
||||||
|
regRouter "github.com/asim/go-micro/v3/router/registry"
|
||||||
"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/mucp"
|
|
||||||
"github.com/micro/go-micro/v3/router"
|
|
||||||
regRouter "github.com/micro/go-micro/v3/router/registry"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Option func(*Options)
|
type Option func(*Options)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/network/resolver"
|
"github.com/asim/go-micro/v3/network/resolver"
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/micro/go-micro/v3/network/resolver"
|
"github.com/asim/go-micro/v3/network/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Resolver is a DNS network resolve
|
// Resolver is a DNS network resolve
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user