Skip to content

Commit

Permalink
v5
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jun 4, 2024
1 parent e11395c commit 610c008
Show file tree
Hide file tree
Showing 224 changed files with 549 additions and 550 deletions.
6 changes: 3 additions & 3 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/go-micro.dev/v4?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/go-micro/go-micro)](https://goreportcard.com/report/github.com/go-micro/go-micro)
# Go Micro [![Go.Dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/go-micro.dev/v5?tab=doc) [![Go Report Card](https://goreportcard.com/badge/github.com/go-micro/go-micro)](https://goreportcard.com/report/github.com/go-micro/go-micro)

Go Micro is a framework for distributed systems development.

Expand Down Expand Up @@ -54,7 +54,7 @@ Go Micro abstracts away the details of distributed systems. Here are the main fe
To make use of Go Micro import it

```golang
import "go-micro.dev/v4"
import "go-micro.dev/v5"
```

Define a handler (protobuf is optionally supported - see [example](https://github.com/go-micro/examples/blob/main/helloworld/main.go))
Expand Down Expand Up @@ -127,4 +127,4 @@ See [github.com/go-micro](https://github.com/go-micro) for tooling.

## License

Go Micro is Apache 2.0 licensed.
[Business Source License 1.1](LICENSE)
8 changes: 4 additions & 4 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"regexp"
"strings"

"go-micro.dev/v4/api/router"
"go-micro.dev/v4/client"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/server"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/client"
"go-micro.dev/v5/registry"
"go-micro.dev/v5/server"
)

// API interface provides a way to
Expand Down
2 changes: 1 addition & 1 deletion api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

"github.com/gorilla/websocket"
"go-micro.dev/v4/logger"
"go-micro.dev/v5/logger"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions api/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package api
import (
"context"

"go-micro.dev/v4/api/handler"
"go-micro.dev/v4/api/handler/rpc"
"go-micro.dev/v4/api/router/registry"
"go-micro.dev/v4/api/server"
"go-micro.dev/v4/api/server/http"
"go-micro.dev/v5/api/handler"
"go-micro.dev/v5/api/handler/rpc"
"go-micro.dev/v5/api/router/registry"
"go-micro.dev/v5/api/server"
"go-micro.dev/v5/api/server/http"
)

type api struct {
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"

"go-micro.dev/v4/api/handler"
api "go-micro.dev/v4/api/proto"
"go-micro.dev/v4/api/router"
"go-micro.dev/v4/client"
"go-micro.dev/v4/errors"
"go-micro.dev/v4/selector"
"go-micro.dev/v4/util/ctx"
"go-micro.dev/v5/api/handler"
api "go-micro.dev/v5/api/proto"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/client"
"go-micro.dev/v5/errors"
"go-micro.dev/v5/selector"
"go-micro.dev/v5/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 @@ -8,9 +8,9 @@ import (
"strings"

"github.com/oxtoacart/bpool"
api "go-micro.dev/v4/api/proto"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/selector"
api "go-micro.dev/v5/api/proto"
"go-micro.dev/v5/registry"
"go-micro.dev/v5/selector"
)

var (
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 @@ -12,9 +12,9 @@ import (

"github.com/google/uuid"
"github.com/oxtoacart/bpool"
"go-micro.dev/v4/api/handler"
proto "go-micro.dev/v4/api/proto"
"go-micro.dev/v4/util/ctx"
"go-micro.dev/v5/api/handler"
proto "go-micro.dev/v5/api/proto"
"go-micro.dev/v5/util/ctx"
)

var (
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"

"go-micro.dev/v4/api/handler"
"go-micro.dev/v4/api/router"
"go-micro.dev/v4/selector"
"go-micro.dev/v5/api/handler"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/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"

"go-micro.dev/v4/api/handler"
"go-micro.dev/v4/api/resolver"
"go-micro.dev/v4/api/resolver/vpath"
"go-micro.dev/v4/api/router"
regRouter "go-micro.dev/v4/api/router/registry"
"go-micro.dev/v4/registry"
"go-micro.dev/v5/api/handler"
"go-micro.dev/v5/api/resolver"
"go-micro.dev/v5/api/resolver/vpath"
"go-micro.dev/v5/api/router"
regRouter "go-micro.dev/v5/api/router/registry"
"go-micro.dev/v5/registry"
)

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

import (
"go-micro.dev/v4/api/router"
"go-micro.dev/v4/client"
"go-micro.dev/v4/logger"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/client"
"go-micro.dev/v5/logger"
)

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 @@ -11,20 +11,20 @@ import (

jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/oxtoacart/bpool"
"go-micro.dev/v4/api/handler"
"go-micro.dev/v4/api/internal/proto"
"go-micro.dev/v4/api/router"
"go-micro.dev/v4/client"
"go-micro.dev/v4/codec"
"go-micro.dev/v4/codec/jsonrpc"
"go-micro.dev/v4/codec/protorpc"
"go-micro.dev/v4/errors"
log "go-micro.dev/v4/logger"
"go-micro.dev/v4/metadata"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/selector"
"go-micro.dev/v4/util/ctx"
"go-micro.dev/v4/util/qson"
"go-micro.dev/v5/api/handler"
"go-micro.dev/v5/api/internal/proto"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/client"
"go-micro.dev/v5/codec"
"go-micro.dev/v5/codec/jsonrpc"
"go-micro.dev/v5/codec/protorpc"
"go-micro.dev/v5/errors"
log "go-micro.dev/v5/logger"
"go-micro.dev/v5/metadata"
"go-micro.dev/v5/registry"
"go-micro.dev/v5/selector"
"go-micro.dev/v5/util/ctx"
"go-micro.dev/v5/util/qson"
)

const (
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 @@ -8,7 +8,7 @@ import (
"testing"

"github.com/golang/protobuf/proto"
go_api "go-micro.dev/v4/api/proto"
go_api "go-micro.dev/v5/api/proto"
)

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

"go-micro.dev/v4/api/handler"
"go-micro.dev/v4/api/router"
"go-micro.dev/v4/selector"
"go-micro.dev/v5/api/handler"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/selector"
)

const (
Expand Down
9 changes: 4 additions & 5 deletions api/options.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package api

import (
"go-micro.dev/v4/api/router"
registry2 "go-micro.dev/v4/api/router/registry"
"go-micro.dev/v4/client"
"go-micro.dev/v4/registry"
"go-micro.dev/v5/api/router"
registry2 "go-micro.dev/v5/api/router/registry"
"go-micro.dev/v5/client"
"go-micro.dev/v5/registry"
)

func NewOptions(opts ...Option) Options {
Expand Down Expand Up @@ -43,4 +43,3 @@ func WithRegistry(r registry.Registry) Option {
return nil
}
}

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"

"go-micro.dev/v4/api/resolver"
"go-micro.dev/v5/api/resolver"
)

// Resolver is the gRPC Resolver.
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"

"go-micro.dev/v4/api/resolver"
"go-micro.dev/v5/api/resolver"
)

// Resolver is a host resolver.
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"

"go-micro.dev/v4/api/resolver"
"go-micro.dev/v5/api/resolver"
)

// Resolver is a path resolver.
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"

"go-micro.dev/v4/api/resolver"
"go-micro.dev/v5/api/resolver"
)

// NewResolver returns a new vpath resolver.
Expand Down
8 changes: 4 additions & 4 deletions api/router/options.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package router

import (
"go-micro.dev/v4/api/resolver"
"go-micro.dev/v4/api/resolver/vpath"
"go-micro.dev/v4/logger"
"go-micro.dev/v4/registry"
"go-micro.dev/v5/api/resolver"
"go-micro.dev/v5/api/resolver/vpath"
"go-micro.dev/v5/logger"
"go-micro.dev/v5/registry"
)

// Options is a struct of options available.
Expand Down
12 changes: 6 additions & 6 deletions api/router/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sync"
"time"

"go-micro.dev/v4/api/router"
"go-micro.dev/v4/api/router/util"
log "go-micro.dev/v4/logger"
"go-micro.dev/v4/metadata"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/registry/cache"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/api/router/util"
log "go-micro.dev/v5/logger"
"go-micro.dev/v5/metadata"
"go-micro.dev/v5/registry"
"go-micro.dev/v5/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 @@ -4,7 +4,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"go-micro.dev/v4/registry"
"go-micro.dev/v5/registry"
)

func TestStoreRegex(t *testing.T) {
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"

"go-micro.dev/v4/registry"
"go-micro.dev/v5/registry"
)

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

"go-micro.dev/v4/api/router"
"go-micro.dev/v4/api/router/util"
log "go-micro.dev/v4/logger"
"go-micro.dev/v4/metadata"
"go-micro.dev/v4/registry"
rutil "go-micro.dev/v4/util/registry"
"go-micro.dev/v5/api/router"
"go-micro.dev/v5/api/router/util"
log "go-micro.dev/v5/logger"
"go-micro.dev/v5/metadata"
"go-micro.dev/v5/registry"
rutil "go-micro.dev/v5/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 @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

log "go-micro.dev/v4/logger"
log "go-micro.dev/v5/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"

"go-micro.dev/v4/logger"
"go-micro.dev/v5/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"

log "go-micro.dev/v4/logger"
log "go-micro.dev/v5/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"

"go-micro.dev/v4/api/server/acme"
log "go-micro.dev/v4/logger"
"go-micro.dev/v5/api/server/acme"
log "go-micro.dev/v5/logger"
"golang.org/x/crypto/acme/autocert"
)

Expand Down
2 changes: 1 addition & 1 deletion api/server/acme/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package acme

import (
"github.com/go-acme/lego/v4/challenge"
"go-micro.dev/v4/logger"
"go-micro.dev/v5/logger"
)

// Option (or Options) are passed to New() to configure providers.
Expand Down
Loading

0 comments on commit 610c008

Please sign in to comment.