v3 refactor (#1868)

* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
Asim Aslam
2020-07-27 13:22:00 +01:00
committed by GitHub
parent 9dfeb98111
commit 563768b58a
424 changed files with 6383 additions and 22490 deletions

View File

@@ -5,9 +5,9 @@ import (
"context"
"time"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/debug/log"
pb "github.com/micro/go-micro/v2/debug/service/proto"
"github.com/micro/go-micro/v3/client/grpc"
"github.com/micro/go-micro/v3/debug/log"
pb "github.com/micro/go-micro/v3/debug/service/proto"
)
// Debug provides debug service client
@@ -86,7 +86,7 @@ func (d *debugClient) streamLogs(lg *logStream, stream pb.Debug_LogService) {
// NewClient provides a debug client
func NewClient(name string) *debugClient {
// create default client
cli := client.DefaultClient
cli := grpc.NewClient()
return &debugClient{
Client: pb.NewDebugService(name, cli),

View File

@@ -5,12 +5,12 @@ import (
"context"
"time"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/debug/log"
proto "github.com/micro/go-micro/v2/debug/service/proto"
"github.com/micro/go-micro/v2/debug/stats"
"github.com/micro/go-micro/v2/debug/trace"
"github.com/micro/go-micro/v2/server"
"github.com/micro/go-micro/v3/client"
"github.com/micro/go-micro/v3/debug/log"
proto "github.com/micro/go-micro/v3/debug/service/proto"
"github.com/micro/go-micro/v3/debug/stats"
"github.com/micro/go-micro/v3/debug/trace"
"github.com/micro/go-micro/v3/server"
)
// NewHandler returns an instance of the Debug Handler

View File

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

View File

@@ -3,8 +3,8 @@ package service
import (
"time"
"github.com/micro/go-micro/v2/debug"
"github.com/micro/go-micro/v2/debug/log"
"github.com/micro/go-micro/v3/debug"
"github.com/micro/go-micro/v3/debug/log"
)
type serviceLog struct {

View File

@@ -1,7 +1,7 @@
package service
import (
"github.com/micro/go-micro/v2/debug/log"
"github.com/micro/go-micro/v3/debug/log"
)
type logStream struct {