move to v4
Some checks failed
coverage / build (push) Failing after 56s
test / test (push) Successful in 2m30s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2025-01-25 15:48:10 +03:00
parent 3f82cb3ba4
commit f3f2a9b737
98 changed files with 294 additions and 294 deletions

View File

@ -6,8 +6,8 @@ import (
"errors"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/metadata"
)
// DefaultBroker default memory broker

View File

@ -4,14 +4,14 @@ import (
"context"
"sync"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/options"
maddr "go.unistack.org/micro/v3/util/addr"
"go.unistack.org/micro/v3/util/id"
mnet "go.unistack.org/micro/v3/util/net"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/options"
maddr "go.unistack.org/micro/v4/util/addr"
"go.unistack.org/micro/v4/util/id"
mnet "go.unistack.org/micro/v4/util/net"
"go.unistack.org/micro/v4/util/rand"
)
type memoryBroker struct {

View File

@ -5,8 +5,8 @@ import (
"fmt"
"testing"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/metadata"
)
func TestMemoryBatchBroker(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"context"
"strings"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v4/options"
)
type NoopBroker struct {

View File

@ -5,13 +5,13 @@ import (
"crypto/tls"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/sync"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/sync"
"go.unistack.org/micro/v4/tracer"
)
// Options struct

View File

@ -5,7 +5,7 @@ import (
"math"
"time"
"go.unistack.org/micro/v3/util/backoff"
"go.unistack.org/micro/v4/util/backoff"
)
// BackoffFunc is the backoff call func

View File

@ -5,8 +5,8 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/metadata"
)
var (

View File

@ -4,8 +4,8 @@ import (
"context"
"sort"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v4/router"
)
// LookupFunc is used to lookup routes for a service

View File

@ -7,14 +7,14 @@ import (
"strconv"
"time"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/semconv"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/selector"
"go.unistack.org/micro/v4/semconv"
"go.unistack.org/micro/v4/tracer"
)
// DefaultCodecs will be used to encode/decode data

View File

@ -6,17 +6,17 @@ import (
"net"
"time"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/selector/random"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/selector"
"go.unistack.org/micro/v4/selector/random"
"go.unistack.org/micro/v4/tracer"
)
// Options holds client options

View File

@ -3,7 +3,7 @@ package client
import (
"context"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v4/errors"
)
// RetryFunc that returning either false or a non-nil error will result in the call not being retried

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v4/errors"
)
func TestRetryAlways(t *testing.T) {

View File

@ -1,7 +1,7 @@
package client
import (
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v4/codec"
)
type testRequest struct {

View File

@ -3,7 +3,7 @@ package cluster
import (
"context"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/metadata"
)
// Message sent to member in cluster

View File

@ -3,9 +3,9 @@ package codec
import (
"context"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/tracer"
)
// Option func

View File

@ -9,10 +9,10 @@ import (
"dario.cat/mergo"
"github.com/google/uuid"
"go.unistack.org/micro/v3/options"
mid "go.unistack.org/micro/v3/util/id"
rutil "go.unistack.org/micro/v3/util/reflect"
mtime "go.unistack.org/micro/v3/util/time"
"go.unistack.org/micro/v4/options"
mid "go.unistack.org/micro/v4/util/id"
rutil "go.unistack.org/micro/v4/util/reflect"
mtime "go.unistack.org/micro/v4/util/time"
)
type defaultConfig struct {
@ -210,7 +210,7 @@ func fillValue(value reflect.Value, val string) error {
return err
}
value.Set(reflect.ValueOf(v))
case value.Type().String() == "time.Duration" && value.Type().PkgPath() == "go.unistack.org/micro/v3/util/time":
case value.Type().String() == "time.Duration" && value.Type().PkgPath() == "go.unistack.org/micro/v4/util/time":
v, err := mtime.ParseDuration(val)
if err != nil {
return err

View File

@ -7,8 +7,8 @@ import (
"testing"
"time"
"go.unistack.org/micro/v3/config"
mtime "go.unistack.org/micro/v3/util/time"
"go.unistack.org/micro/v4/config"
mtime "go.unistack.org/micro/v4/util/time"
)
type cfg struct {

View File

@ -4,11 +4,11 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/tracer"
)
// Options hold the config options

View File

@ -3,7 +3,7 @@ package micro
import (
"context"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v4/client"
)
// Event is used to publish messages to a topic

View File

@ -6,12 +6,12 @@ import (
"sync"
"github.com/silas/dag"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/util/id"
)
type microFlow struct {

View File

@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/metadata"
)
var (

View File

@ -4,11 +4,11 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/tracer"
)
// Option func

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v4/logger"
)
func TestFSMStart(t *testing.T) {

12
go.mod
View File

@ -1,11 +1,11 @@
module go.unistack.org/micro/v3
module go.unistack.org/micro/v4
go 1.22.0
require (
dario.cat/mergo v1.0.1
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/KimMachineGun/automemlimit v0.6.1
github.com/KimMachineGun/automemlimit v0.7.0
github.com/ash3in/uuidv8 v1.2.0
github.com/google/uuid v1.6.0
github.com/matoous/go-nanoid v1.5.1
@ -14,8 +14,8 @@ require (
go.uber.org/automaxprocs v1.6.0
go.unistack.org/micro-proto/v3 v3.4.1
golang.org/x/sync v0.10.0
google.golang.org/grpc v1.69.2
google.golang.org/protobuf v1.36.1
google.golang.org/grpc v1.69.4
google.golang.org/protobuf v1.36.3
gopkg.in/yaml.v3 v3.0.1
)
@ -36,8 +36,8 @@ require (
github.com/stretchr/testify v1.10.0 // indirect
go.uber.org/goleak v1.3.0 // indirect
golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)

View File

@ -8,7 +8,7 @@ import (
"slices"
"time"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v4/meter"
)
// Option func signature

View File

@ -13,9 +13,9 @@ import (
"sync/atomic"
"time"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/semconv"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/semconv"
"go.unistack.org/micro/v4/tracer"
)
const (

View File

@ -12,9 +12,9 @@ import (
"time"
"github.com/google/uuid"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/util/buffer"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/util/buffer"
)
// always first to have proper check

View File

@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v4/codec"
)
const sf = "0-+# "

View File

@ -5,7 +5,7 @@ import (
"strings"
"testing"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v4/codec"
)
func TestUnwrap(t *testing.T) {

View File

@ -3,21 +3,21 @@ package micro
import (
"reflect"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/flow"
"go.unistack.org/micro/v3/fsm"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/sync"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/flow"
"go.unistack.org/micro/v4/fsm"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/resolver"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/selector"
"go.unistack.org/micro/v4/server"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/sync"
"go.unistack.org/micro/v4/tracer"
)
func As(b any, target any) bool {

View File

@ -6,8 +6,8 @@ import (
"reflect"
"testing"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/fsm"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/fsm"
)
func TestAs(t *testing.T) {

View File

@ -2,8 +2,8 @@
package network
import (
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/server"
)
// Error is network node errors

View File

@ -1,13 +1,13 @@
package network
import (
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/network/tunnel"
"go.unistack.org/micro/v3/proxy"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/network/tunnel"
"go.unistack.org/micro/v4/proxy"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/tracer"
"go.unistack.org/micro/v4/util/id"
)
// Option func

View File

@ -8,9 +8,9 @@ import (
"sync"
"time"
maddr "go.unistack.org/micro/v3/util/addr"
mnet "go.unistack.org/micro/v3/util/net"
"go.unistack.org/micro/v3/util/rand"
maddr "go.unistack.org/micro/v4/util/addr"
mnet "go.unistack.org/micro/v4/util/net"
"go.unistack.org/micro/v4/util/rand"
)
type memorySocket struct {

View File

@ -5,10 +5,10 @@ import (
"crypto/tls"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/tracer"
)
// Options struct holds the transport options

View File

@ -5,7 +5,7 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/metadata"
)
var (

View File

@ -5,11 +5,11 @@ import (
"context"
"fmt"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/tunnel"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/network/transport"
"go.unistack.org/micro/v4/network/tunnel"
)
type tunBroker struct {

View File

@ -3,11 +3,11 @@ package tunnel
import (
"time"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/network/transport"
"go.unistack.org/micro/v4/tracer"
"go.unistack.org/micro/v4/util/id"
)
var (

View File

@ -1,8 +1,8 @@
package transport
import (
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/tunnel"
"go.unistack.org/micro/v4/network/transport"
"go.unistack.org/micro/v4/network/tunnel"
)
type tunListener struct {

View File

@ -5,8 +5,8 @@ import (
"context"
"fmt"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v3/network/tunnel"
"go.unistack.org/micro/v4/network/transport"
"go.unistack.org/micro/v4/network/tunnel"
)
type tunTransport struct {

View File

@ -6,7 +6,7 @@ import (
"errors"
"time"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v4/network/transport"
)
// DefaultTunnel contains default tunnel implementation

View File

@ -5,17 +5,17 @@ import (
"fmt"
"time"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/config"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/config"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/server"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/tracer"
)
// Options for micro service

View File

@ -7,7 +7,7 @@ import (
"net/http/pprof"
"sync"
profile "go.unistack.org/micro/v3/profiler"
profile "go.unistack.org/micro/v4/profiler"
)
type httpProfile struct {

View File

@ -9,7 +9,7 @@ import (
"sync"
"time"
profile "go.unistack.org/micro/v3/profiler"
profile "go.unistack.org/micro/v4/profiler"
)
type profiler struct {

View File

@ -2,11 +2,11 @@
package proxy
import (
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/tracer"
)
// Options for proxy

View File

@ -4,7 +4,7 @@ package proxy
import (
"context"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v4/server"
)
// DefaultEndpoint holds default proxy address

View File

@ -6,9 +6,9 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/util/id"
)
var (

View File

@ -7,7 +7,7 @@ import (
"testing"
"time"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v4/register"
)
var testData = map[string][]*register.Service{

View File

@ -5,10 +5,10 @@ import (
"crypto/tls"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/tracer"
)
// Options holds options for register

View File

@ -5,7 +5,7 @@ import (
"context"
"errors"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/metadata"
)
const (

View File

@ -7,7 +7,7 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/resolver"
)
// Resolver is a DNS network resolve

View File

@ -5,7 +5,7 @@ import (
"fmt"
"net"
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/resolver"
)
// Resolver is a DNS network resolve

View File

@ -8,7 +8,7 @@ import (
"net/http"
"net/url"
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/resolver"
)
// nolint: golint,revive

View File

@ -2,7 +2,7 @@
package noop
import (
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/resolver"
)
// Resolver contains noop resolver

View File

@ -4,8 +4,8 @@ package register
import (
"context"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/resolver"
)
// Resolver is a register network resolver

View File

@ -2,7 +2,7 @@
package static
import (
"go.unistack.org/micro/v3/resolver"
"go.unistack.org/micro/v4/resolver"
)
// Resolver returns a static list of nodes. In the event the node list

View File

@ -3,9 +3,9 @@ package router
import (
"context"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/util/id"
)
// Options are router options

View File

@ -3,7 +3,7 @@ package router
import (
"hash/fnv"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/metadata"
)
var (

View File

@ -1,8 +1,8 @@
package random
import (
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/selector"
"go.unistack.org/micro/v4/util/rand"
)
type random struct{}

View File

@ -3,7 +3,7 @@ package random
import (
"testing"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v4/selector"
)
func TestRandom(t *testing.T) {

View File

@ -1,8 +1,8 @@
package roundrobin
import (
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/selector"
"go.unistack.org/micro/v4/util/rand"
)
// NewSelector returns an initialised round robin selector

View File

@ -3,7 +3,7 @@ package roundrobin
import (
"testing"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v4/selector"
)
func TestRoundRobin(t *testing.T) {

View File

@ -1,6 +1,6 @@
package server
import "go.unistack.org/micro/v3/errors"
import "go.unistack.org/micro/v4/errors"
type Error struct {
id string

View File

@ -3,7 +3,7 @@ package server
import (
"testing"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v4/errors"
)
func TestError(t *testing.T) {

View File

@ -9,16 +9,16 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/register"
maddr "go.unistack.org/micro/v3/util/addr"
mnet "go.unistack.org/micro/v3/util/net"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/register"
maddr "go.unistack.org/micro/v4/util/addr"
mnet "go.unistack.org/micro/v4/util/net"
"go.unistack.org/micro/v4/util/rand"
)
// DefaultCodecs will be used to encode/decode

View File

@ -5,12 +5,12 @@ import (
"fmt"
"testing"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/server"
)
type TestHandler struct {

View File

@ -7,16 +7,16 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/register"
msync "go.unistack.org/micro/v3/sync"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/register"
msync "go.unistack.org/micro/v4/sync"
"go.unistack.org/micro/v4/tracer"
"go.unistack.org/micro/v4/util/id"
)
// Option func

View File

@ -4,10 +4,10 @@ import (
"net"
"time"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/util/addr"
"go.unistack.org/micro/v3/util/backoff"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/util/addr"
"go.unistack.org/micro/v4/util/backoff"
)
var (

View File

@ -5,8 +5,8 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/metadata"
)
// DefaultServer default server

View File

@ -9,17 +9,17 @@ import (
"github.com/KimMachineGun/automemlimit/memlimit"
"go.uber.org/automaxprocs/maxprocs"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/config"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/tracer"
utildns "go.unistack.org/micro/v3/util/dns"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/config"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/server"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/tracer"
utildns "go.unistack.org/micro/v4/util/dns"
)
func init() {

View File

@ -5,16 +5,16 @@ import (
"reflect"
"testing"
"go.unistack.org/micro/v3/broker"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/config"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/config"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/server"
"go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v4/tracer"
)
func TestClient(t *testing.T) {

View File

@ -8,8 +8,8 @@ import (
"time"
cache "github.com/patrickmn/go-cache"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/store"
)
// NewStore returns a memory store

View File

@ -5,7 +5,7 @@ import (
"testing"
"time"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v4/store"
)
type testHook struct {

View File

@ -5,8 +5,8 @@ import (
"sync"
"sync/atomic"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/util/id"
)
var _ Store = (*noopStore)(nil)

View File

@ -5,12 +5,12 @@ import (
"crypto/tls"
"time"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/options"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/options"
"go.unistack.org/micro/v4/tracer"
)
// Options contains configuration for the Store

View File

@ -3,9 +3,9 @@ package sync
import (
"time"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/tracer"
)
// Options holds the sync options

View File

@ -4,8 +4,8 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/tracer"
"go.unistack.org/micro/v4/util/id"
)
var _ tracer.Tracer = (*Tracer)(nil)

View File

@ -7,9 +7,9 @@ import (
"strings"
"testing"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/logger/slog"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/logger/slog"
"go.unistack.org/micro/v4/tracer"
)
func TestLoggerWithTracer(t *testing.T) {

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/util/id"
)
var _ Tracer = (*noopTracer)(nil)

View File

@ -3,7 +3,7 @@ package tracer
import (
"context"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v4/logger"
)
type SpanStatus int

View File

@ -4,7 +4,7 @@ package tracer
import (
"context"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v4/logger"
)
var (

View File

@ -7,8 +7,8 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/semconv"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/semconv"
)
// DialFunc is a [net.Resolver.Dial] function.

View File

@ -8,7 +8,7 @@ import (
"sync/atomic"
"time"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/tracer"
grpc_codes "google.golang.org/grpc/codes"
"google.golang.org/grpc/peer"
"google.golang.org/grpc/stats"

View File

@ -23,7 +23,7 @@ import (
"strings"
"sync"
"go.unistack.org/micro/v3/tracer"
"go.unistack.org/micro/v4/tracer"
)
const (

View File

@ -8,8 +8,8 @@ import (
"net/http"
"strings"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/selector/random"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/selector/random"
)
// Write sets the status and body on a http ResponseWriter

View File

@ -9,10 +9,10 @@ import (
"net/http"
"testing"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v3/register/memory"
"go.unistack.org/micro/v3/router"
regRouter "go.unistack.org/micro/v3/router/register"
"go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v4/router"
regRouter "go.unistack.org/micro/v4/router/register"
)
func TestRoundTripper(t *testing.T) {

View File

@ -1,6 +1,6 @@
package http
import "go.unistack.org/micro/v3/router"
import "go.unistack.org/micro/v4/router"
// Options struct
type Options struct {

View File

@ -4,8 +4,8 @@ import (
"errors"
"net/http"
"go.unistack.org/micro/v3/router"
"go.unistack.org/micro/v3/selector"
"go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v4/selector"
)
type roundTripper struct {

View File

@ -4,7 +4,7 @@ package jitter
import (
"time"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/util/rand"
)
// Random returns a random time to jitter with max cap specified

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/util/rand"
"go.unistack.org/micro/v4/util/rand"
)
// Ticker is similar to time.Ticker but ticks at random intervals between

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
rutil "go.unistack.org/micro/v3/util/reflect"
rutil "go.unistack.org/micro/v4/util/reflect"
)
func TestStructFields(t *testing.T) {

View File

@ -4,8 +4,8 @@ import (
"context"
"time"
"go.unistack.org/micro/v3/register"
jitter "go.unistack.org/micro/v3/util/jitter"
"go.unistack.org/micro/v4/register"
jitter "go.unistack.org/micro/v4/util/jitter"
)
func addNodes(old, neu []*register.Node) []*register.Node {

View File

@ -4,7 +4,7 @@ import (
"os"
"testing"
"go.unistack.org/micro/v3/register"
"go.unistack.org/micro/v4/register"
)
func TestRemove(t *testing.T) {

View File

@ -5,7 +5,7 @@ import (
"sync"
"time"
"go.unistack.org/micro/v3/util/id"
"go.unistack.org/micro/v4/util/id"
)
// Buffer is ring buffer

View File

@ -4,7 +4,7 @@ package socket
import (
"io"
"go.unistack.org/micro/v3/network/transport"
"go.unistack.org/micro/v4/network/transport"
)
// Socket is our pseudo socket for transport.Socket

View File

@ -5,10 +5,10 @@ import (
"context"
"sync"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v3/server"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v4/server"
)
// Stream interface

View File

@ -16,10 +16,10 @@ import (
"time"
sqlmock "github.com/DATA-DOG/go-sqlmock"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/codec"
"go.unistack.org/micro/v3/errors"
"go.unistack.org/micro/v3/metadata"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v4/metadata"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"

View File

@ -8,8 +8,8 @@ import (
"sync/atomic"
"time"
"go.unistack.org/micro/v3/meter"
"go.unistack.org/micro/v3/semconv"
"go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v4/semconv"
)
var (