Skip to content

Commit

Permalink
v3 (micro#2104)
Browse files Browse the repository at this point in the history
* v3

* revert plugins

* fixup some issues
  • Loading branch information
asim committed Jan 20, 2021
1 parent bf4ab67 commit d94936f
Show file tree
Hide file tree
Showing 369 changed files with 1,442 additions and 817 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Go Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/micro/go-micro/v2?tab=doc) [![Travis CI](https://api.travis-ci.org/micro/go-micro.svg?branch=master)](https://travis-ci.org/micro/go-micro) [![Go Report Card](https://goreportcard.com/badge/micro/go-micro)](https://goreportcard.com/report/github.com/micro/go-micro)
# Go Micro [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/asim/go-micro/v3?tab=doc) [![Travis CI](https://api.travis-ci.org/micro/go-micro.svg?branch=master)](https://travis-ci.org/micro/go-micro) [![Go Report Card](https://goreportcard.com/badge/micro/go-micro)](https://goreportcard.com/report/github.com/micro/go-micro)

Go Micro is a framework for distributed systems development.

Expand Down Expand Up @@ -51,7 +51,7 @@ are pluggable and allows Go Micro to be runtime agnostic. You can plugin any und
To make use of Go Micro

```golang
import "github.com/micro/go-micro/v2"
import "github.com/asim/go-micro/v3"

// create a new service
service := micro.NewService(
Expand Down
4 changes: 2 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"strings"

"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/server"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/server"
)

type Api interface {
Expand Down
14 changes: 7 additions & 7 deletions api/handler/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package api
import (
"net/http"

goapi "github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/handler"
api "github.com/micro/go-micro/v2/api/proto"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/selector"
"github.com/micro/go-micro/v2/util/ctx"
goapi "github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/handler"
api "github.com/asim/go-micro/v3/api/proto"
"github.com/asim/go-micro/v3/client"
"github.com/asim/go-micro/v3/errors"
"github.com/asim/go-micro/v3/selector"
"github.com/asim/go-micro/v3/util/ctx"
)

type apiHandler struct {
Expand Down
6 changes: 3 additions & 3 deletions api/handler/api/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"net/http"
"strings"

api "github.com/micro/go-micro/v2/api/proto"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/selector"
api "github.com/asim/go-micro/v3/api/proto"
"github.com/asim/go-micro/v3/registry"
"github.com/asim/go-micro/v3/selector"
"github.com/oxtoacart/bpool"
)

Expand Down
6 changes: 3 additions & 3 deletions api/handler/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"strings"
"time"

"github.com/asim/go-micro/v3/api/handler"
proto "github.com/asim/go-micro/v3/api/proto"
"github.com/asim/go-micro/v3/util/ctx"
"github.com/google/uuid"
"github.com/micro/go-micro/v2/api/handler"
proto "github.com/micro/go-micro/v2/api/proto"
"github.com/micro/go-micro/v2/util/ctx"
"github.com/oxtoacart/bpool"
)

Expand Down
6 changes: 3 additions & 3 deletions api/handler/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net/http/httputil"
"net/url"

"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/handler"
"github.com/micro/go-micro/v2/selector"
"github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/handler"
"github.com/asim/go-micro/v3/selector"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions api/handler/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"net/http/httptest"
"testing"

"github.com/micro/go-micro/v2/api/handler"
"github.com/micro/go-micro/v2/api/resolver"
"github.com/micro/go-micro/v2/api/resolver/vpath"
"github.com/micro/go-micro/v2/api/router"
regRouter "github.com/micro/go-micro/v2/api/router/registry"
"github.com/micro/go-micro/v2/registry"
"github.com/asim/go-micro/v3/api/handler"
"github.com/asim/go-micro/v3/api/resolver"
"github.com/asim/go-micro/v3/api/resolver/vpath"
"github.com/asim/go-micro/v3/api/router"
regRouter "github.com/asim/go-micro/v3/api/router/registry"
"github.com/asim/go-micro/v3/registry"
)

func testHttp(t *testing.T, path, service, ns string) {
Expand Down
4 changes: 2 additions & 2 deletions api/handler/options.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package handler

import (
"github.com/micro/go-micro/v2/api/router"
"github.com/micro/go-micro/v2/client"
"github.com/asim/go-micro/v3/api/router"
"github.com/asim/go-micro/v3/client"
)

var (
Expand Down
28 changes: 14 additions & 14 deletions api/handler/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ import (
"strconv"
"strings"

"github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/handler"
"github.com/asim/go-micro/v3/api/internal/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/registry"
"github.com/asim/go-micro/v3/selector"
"github.com/asim/go-micro/v3/util/ctx"
"github.com/asim/go-micro/v3/util/qson"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/handler"
"github.com/micro/go-micro/v2/api/internal/proto"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/codec"
"github.com/micro/go-micro/v2/codec/jsonrpc"
"github.com/micro/go-micro/v2/codec/protorpc"
"github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/metadata"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/selector"
"github.com/micro/go-micro/v2/util/ctx"
"github.com/micro/go-micro/v2/util/qson"
"github.com/oxtoacart/bpool"
)

Expand Down
2 changes: 1 addition & 1 deletion api/handler/rpc/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"testing"

go_api "github.com/asim/go-micro/v3/api/proto"
"github.com/golang/protobuf/proto"
go_api "github.com/micro/go-micro/v2/api/proto"
)

func TestRequestPayloadFromRequest(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions api/handler/rpc/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"strings"
"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/selector"
"github.com/gobwas/httphead"
"github.com/gobwas/ws"
"github.com/gobwas/ws/wsutil"
"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/client"
raw "github.com/micro/go-micro/v2/codec/bytes"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/selector"
)

// serveWebsocket will stream rpc back over websockets assuming json
Expand Down
6 changes: 3 additions & 3 deletions api/handler/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"net/url"
"strings"

"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/handler"
"github.com/micro/go-micro/v2/selector"
"github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/handler"
"github.com/asim/go-micro/v3/selector"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion api/resolver/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"strings"

"github.com/micro/go-micro/v2/api/resolver"
"github.com/asim/go-micro/v3/api/resolver"
)

type Resolver struct{}
Expand Down
2 changes: 1 addition & 1 deletion api/resolver/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package host
import (
"net/http"

"github.com/micro/go-micro/v2/api/resolver"
"github.com/asim/go-micro/v3/api/resolver"
)

type Resolver struct {
Expand Down
2 changes: 1 addition & 1 deletion api/resolver/path/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/micro/go-micro/v2/api/resolver"
"github.com/asim/go-micro/v3/api/resolver"
)

type Resolver struct {
Expand Down
2 changes: 1 addition & 1 deletion api/resolver/vpath/vpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"regexp"
"strings"

"github.com/micro/go-micro/v2/api/resolver"
"github.com/asim/go-micro/v3/api/resolver"
)

func NewResolver(opts ...resolver.Option) resolver.Resolver {
Expand Down
6 changes: 3 additions & 3 deletions api/router/options.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package router

import (
"github.com/micro/go-micro/v2/api/resolver"
"github.com/micro/go-micro/v2/api/resolver/vpath"
"github.com/micro/go-micro/v2/registry"
"github.com/asim/go-micro/v3/api/resolver"
"github.com/asim/go-micro/v3/api/resolver/vpath"
"github.com/asim/go-micro/v3/registry"
)

type Options struct {
Expand Down
14 changes: 7 additions & 7 deletions api/router/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"sync"
"time"

"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/router"
"github.com/micro/go-micro/v2/api/router/util"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/metadata"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/cache"
"github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/router"
"github.com/asim/go-micro/v3/api/router/util"
"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/registry/cache"
)

// endpoint struct, that holds compiled pcre
Expand Down
2 changes: 1 addition & 1 deletion api/router/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package registry
import (
"testing"

"github.com/micro/go-micro/v2/registry"
"github.com/asim/go-micro/v3/registry"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion api/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package router
import (
"net/http"

"github.com/micro/go-micro/v2/api"
"github.com/asim/go-micro/v3/api"
)

// Router is used to determine an endpoint for a request
Expand Down
14 changes: 7 additions & 7 deletions api/router/static/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"strings"
"sync"

"github.com/micro/go-micro/v2/api"
"github.com/micro/go-micro/v2/api/router"
"github.com/micro/go-micro/v2/api/router/util"
"github.com/micro/go-micro/v2/logger"
"github.com/micro/go-micro/v2/metadata"
"github.com/micro/go-micro/v2/registry"
rutil "github.com/micro/go-micro/v2/util/registry"
"github.com/asim/go-micro/v3/api"
"github.com/asim/go-micro/v3/api/router"
"github.com/asim/go-micro/v3/api/router/util"
"github.com/asim/go-micro/v3/logger"
"github.com/asim/go-micro/v3/metadata"
"github.com/asim/go-micro/v3/registry"
rutil "github.com/asim/go-micro/v3/util/registry"
)

type endpoint struct {
Expand Down
2 changes: 1 addition & 1 deletion api/router/util/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

"github.com/micro/go-micro/v2/logger"
"github.com/asim/go-micro/v3/logger"
)

// InvalidTemplateError indicates that the path template is not valid.
Expand Down
2 changes: 1 addition & 1 deletion api/router/util/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"reflect"
"testing"

"github.com/micro/go-micro/v2/logger"
"github.com/asim/go-micro/v3/logger"
)

func TestTokenize(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/router/util/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

"github.com/micro/go-micro/v2/logger"
"github.com/asim/go-micro/v3/logger"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions api/server/acme/autocert/autocert.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net"
"os"

"github.com/micro/go-micro/v2/api/server/acme"
"github.com/micro/go-micro/v2/logger"
"github.com/asim/go-micro/v3/api/server/acme"
"github.com/asim/go-micro/v3/logger"
"golang.org/x/crypto/acme/autocert"
)

Expand Down
6 changes: 3 additions & 3 deletions api/server/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"os"
"sync"

"github.com/asim/go-micro/v3/api/server"
"github.com/asim/go-micro/v3/api/server/cors"
"github.com/asim/go-micro/v3/logger"
"github.com/gorilla/handlers"
"github.com/micro/go-micro/v2/api/server"
"github.com/micro/go-micro/v2/api/server/cors"
"github.com/micro/go-micro/v2/logger"
)

type httpServer struct {
Expand Down
4 changes: 2 additions & 2 deletions api/server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"crypto/tls"
"net/http"

"github.com/micro/go-micro/v2/api/resolver"
"github.com/micro/go-micro/v2/api/server/acme"
"github.com/asim/go-micro/v3/api/resolver"
"github.com/asim/go-micro/v3/api/server/acme"
)

type Option func(o *Options)
Expand Down
14 changes: 7 additions & 7 deletions broker/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
"sync"
"time"

"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"
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/micro/go-micro/v2/codec/json"
merr "github.com/micro/go-micro/v2/errors"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v2/registry/cache"
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"
"golang.org/x/net/http2"
)

Expand Down
Loading

0 comments on commit d94936f

Please sign in to comment.