Skip to content

Commit

Permalink
rewrite everything
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Oct 13, 2021
1 parent 7136c61 commit d4c14e6
Show file tree
Hide file tree
Showing 334 changed files with 1,586 additions and 936 deletions.
2 changes: 1 addition & 1 deletion cmd/gomu/cmd/cli/new/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func protoComments(name, dir string) []string {
"\ndownload protobuf for go-micro:\n",
"go get -u google.golang.org/protobuf/proto",
"go install github.com/golang/protobuf/protoc-gen-go@latest",
"go install github.com/asim/go-micro/cmd/protoc-gen-micro/v4@latest",
"go install go-micro.dev/cmd/protoc-gen-micro/v4@latest",
"\ncompile the proto file " + name + ".proto:\n",
"cd " + dir,
"make proto tidy\n",
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomu/generator/template/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ package template
var Plugins = `package main
import (
_ "github.com/asim/go-micro/plugins/registry/kubernetes/v3"
_ "go-micro.dev/plugins/registry/kubernetes/v4"
)
`
2 changes: 1 addition & 1 deletion examples/broker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Broker

The [broker](https://godoc.org/github.com/asim/go-micro/broker#Broker) is an interface for PubSub.
The [broker](https://godoc.org/go-micro.dev/broker#Broker) is an interface for PubSub.

## Contents

Expand Down
4 changes: 2 additions & 2 deletions examples/cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ Finally you can delete keys from the cache.
gomu call go.micro.srv.cache Cache.Delete '{"key":"test"}'
```

[1]: https://github.com/asim/go-micro/tree/master/cache
[2]: https://github.com/asim/go-micro/tree/master/cmd/gomu
[1]: https://go-micro.dev/tree/master/cache
[2]: https://go-micro.dev/tree/master/cmd/gomu
2 changes: 1 addition & 1 deletion examples/cache/handler/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"go-micro.dev/v4/cache"
log "go-micro.dev/v4/logger"

pb "github.com/asim/go-micro/examples/v3/cache/proto"
pb "go-micro.dev/examples/v4/cache/proto"
)

type Cache struct {
Expand Down
4 changes: 2 additions & 2 deletions examples/cache/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/asim/go-micro/examples/v3/cache/handler"
pb "github.com/asim/go-micro/examples/v3/cache/proto"
"go-micro.dev/examples/v4/cache/handler"
pb "go-micro.dev/examples/v4/cache/proto"

"go-micro.dev/v4"
log "go-micro.dev/v4/logger"
Expand Down
2 changes: 1 addition & 1 deletion examples/client/codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"context"
example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
"go-micro.dev/v4/cmd"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/client/dc_filter/dc_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go-micro.dev/v4/metadata"
"go-micro.dev/v4/registry"

example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion examples/client/dc_selector/dc_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go-micro.dev/v4/cmd"
"go-micro.dev/v4/registry"

example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
)

// Built in random hashed node selector
Expand Down
2 changes: 1 addition & 1 deletion examples/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"context"
example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
"go-micro.dev/v4"
"go-micro.dev/v4/client"
"go-micro.dev/v4/metadata"
Expand Down
2 changes: 1 addition & 1 deletion examples/client/pub/pub.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"context"
example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
"go-micro.dev/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/client/selector/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math/rand"
"time"

example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
"go-micro.dev/v4/client"
"go-micro.dev/v4/selector"
"go-micro.dev/v4/cmd"
Expand Down
2 changes: 1 addition & 1 deletion examples/client/wrapper/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"context"
example "github.com/asim/go-micro/examples/v3/server/proto/example"
example "go-micro.dev/examples/v4/server/proto/example"
"go-micro.dev/v4/client"
"go-micro.dev/v4/cmd"
"go-micro.dev/v4/metadata"
Expand Down
2 changes: 1 addition & 1 deletion examples/config/grpc/client/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
grpcConfig "github.com/asim/go-micro/plugins/config/source/grpc/v3"
grpcConfig "go-micro.dev/plugins/config/source/grpc/v4"
"go-micro.dev/v4/config"
log "go-micro.dev/v4/logger"
)
Expand Down
4 changes: 2 additions & 2 deletions examples/config/grpc/srv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

yaml "github.com/asim/go-micro/plugins/config/encoder/yaml/v3"
proto "github.com/asim/go-micro/plugins/config/source/grpc/v3/proto"
yaml "go-micro.dev/plugins/config/encoder/yaml/v4"
proto "go-micro.dev/plugins/config/source/grpc/v4/proto"
"go-micro.dev/v4/config"
"go-micro.dev/v4/config/reader"
"go-micro.dev/v4/config/reader/json"
Expand Down
2 changes: 1 addition & 1 deletion examples/config/modify/modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"

"go-micro.dev/v4/config"
"github.com/asim/go-micro/plugins/config/encoder/toml/v3"
"go-micro.dev/plugins/config/encoder/toml/v4"
"go-micro.dev/v4/config/source"
"go-micro.dev/v4/config/source/file"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/config/yaml/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

yaml "github.com/asim/go-micro/plugins/config/encoder/yaml/v3"
yaml "go-micro.dev/plugins/config/encoder/yaml/v4"
"go-micro.dev/v4/config"
"go-micro.dev/v4/config/reader"
"go-micro.dev/v4/config/reader/json"
Expand Down
4 changes: 2 additions & 2 deletions examples/event/srv/proto/pubsub.micro.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/event/srv/proto/pubsub.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/filter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"fmt"

"github.com/asim/go-micro/examples/v3/filter/version"
proto "github.com/asim/go-micro/examples/v3/service/proto"
"go-micro.dev/examples/v4/filter/version"
proto "go-micro.dev/examples/v4/service/proto"
"go-micro.dev/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/function/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is an example of creating a micro function. A function is a one time execut

```shell
while true; do
github.com/asim/go-micro/examples/v3/function
go-micro.dev/examples/v4/function
done
```

Expand Down
2 changes: 1 addition & 1 deletion examples/function/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"

proto "github.com/asim/go-micro/examples/v3/function/proto"
proto "go-micro.dev/examples/v4/function/proto"
"go-micro.dev/v4"
)

Expand Down
4 changes: 2 additions & 2 deletions examples/function/proto/greeter.micro.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/function/proto/greeter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains a grpc gateway generated using [grpc-ecosystem/grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway).

Services written with [asim/go-micro/service/grpc](https://github.com/asim/go-micro/service/grpc) are fully compatible with the grpc-gateway and any other
Services written with [asim/go-micro/service/grpc](https://go-micro.dev/service/grpc) are fully compatible with the grpc-gateway and any other
grpc services.

Go to [grpc-ecosystem/grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) for details on how to generate gateways. We
Expand Down
2 changes: 1 addition & 1 deletion examples/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc"

hello "github.com/asim/go-micro/examples/v3/gateway/proto/hello"
hello "go-micro.dev/examples/v4/gateway/proto/hello"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/getip/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

proto "github.com/asim/go-micro/examples/v3/service/proto"
proto "go-micro.dev/examples/v4/service/proto"
"go-micro.dev/v4"
"go-micro.dev/v4/metadata"
)
Expand Down
4 changes: 2 additions & 2 deletions examples/getip/proto/greeter.micro.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/getip/proto/greeter.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
module github.com/asim/go-micro/examples/v3
module go-micro.dev/examples/v4

go 1.16

require (
github.com/asim/go-micro/plugins/client/http/v3 v3.0.0-20210403073940-e7a7e3a05092
github.com/asim/go-micro/plugins/config/encoder/toml/v3 v3.0.0-20210403073940-e7a7e3a05092
github.com/asim/go-micro/plugins/config/encoder/yaml/v3 v3.0.0-20210804083901-3e0411a3f61b
github.com/asim/go-micro/plugins/config/source/grpc/v3 v3.0.0-20210403073940-e7a7e3a05092
github.com/asim/go-micro/plugins/server/http/v3 v3.0.0-20210403073940-e7a7e3a05092
github.com/asim/go-micro/plugins/wrapper/select/roundrobin/v3 v3.0.0-20210403073940-e7a7e3a05092
github.com/asim/go-micro/plugins/wrapper/select/shard/v3 v3.0.0-20210403073940-e7a7e3a05092
go-micro.dev/v4 v4.1.0
go-micro.dev/plugins/client/http/v4 v4.1.0
go-micro.dev/plugins/config/encoder/toml/v4 v4.1.0
go-micro.dev/plugins/config/encoder/yaml/v4 v4.1.0
go-micro.dev/plugins/config/source/grpc/v4 v4.1.0
go-micro.dev/plugins/server/http/v4 v4.1.0
go-micro.dev/plugins/wrapper/select/roundrobin/v4 v4.1.0
go-micro.dev/plugins/wrapper/select/shard/v4 v4.1.0
github.com/gin-gonic/gin v1.7.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/pborman/uuid v1.2.1
github.com/urfave/cli/v2 v2.3.0
go-micro.dev/v4 v4.1.0
golang.org/x/net v0.0.0-20210510120150-4163338589ed
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84
google.golang.org/grpc v1.38.0
Expand Down
Loading

0 comments on commit d4c14e6

Please sign in to comment.