v3 refactor (#1868)
* Move to v3 Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Package kubernetes is a logger implementing (github.com/micro/go-micro/v2/debug/log).Log
|
||||
// Package kubernetes is a logger implementing (github.com/micro/go-micro/v3/debug/log).Log
|
||||
package kubernetes
|
||||
|
||||
import (
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v2/util/kubernetes/client"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
"github.com/micro/go-micro/v3/util/kubernetes/client"
|
||||
)
|
||||
|
||||
type klog struct {
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
)
|
||||
|
||||
func write(l log.Record) error {
|
||||
|
@@ -4,8 +4,8 @@ package memory
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v2/util/ring"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
"github.com/micro/go-micro/v3/util/ring"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
)
|
||||
|
||||
func TestLogger(t *testing.T) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
)
|
||||
|
||||
type logStream struct {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package noop
|
||||
|
||||
import (
|
||||
"github.com/micro/go-micro/v2/debug/log"
|
||||
"github.com/micro/go-micro/v3/debug/log"
|
||||
)
|
||||
|
||||
type noop struct{}
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/micro/go-micro/v2/util/ring"
|
||||
"github.com/micro/go-micro/v3/util/ring"
|
||||
)
|
||||
|
||||
// Should stream from OS
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"net/http/pprof"
|
||||
"sync"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/profile"
|
||||
"github.com/micro/go-micro/v3/debug/profile"
|
||||
)
|
||||
|
||||
type httpProfile struct {
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/debug/profile"
|
||||
"github.com/micro/go-micro/v3/debug/profile"
|
||||
)
|
||||
|
||||
type profiler struct {
|
||||
|
@@ -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),
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/util/ring"
|
||||
"github.com/micro/go-micro/v3/util/ring"
|
||||
)
|
||||
|
||||
type stats struct {
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/micro/go-micro/v2/debug/trace"
|
||||
"github.com/micro/go-micro/v2/util/ring"
|
||||
"github.com/micro/go-micro/v3/debug/trace"
|
||||
"github.com/micro/go-micro/v3/util/ring"
|
||||
)
|
||||
|
||||
type Tracer struct {
|
||||
|
@@ -5,7 +5,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/micro/go-micro/v2/metadata"
|
||||
"github.com/micro/go-micro/v3/metadata"
|
||||
)
|
||||
|
||||
// Tracer is an interface for distributed tracing
|
||||
|
Reference in New Issue
Block a user