From f3f2a9b73728b36ceb60b7888eacef6833172774 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 25 Jan 2025 15:48:10 +0300 Subject: [PATCH] move to v4 Signed-off-by: Vasiliy Tolstov --- broker/broker.go | 4 ++-- broker/memory/memory.go | 16 +++++++------- broker/memory/memory_test.go | 4 ++-- broker/noop.go | 2 +- broker/options.go | 14 ++++++------ client/backoff.go | 2 +- client/client.go | 4 ++-- client/lookup.go | 4 ++-- client/noop.go | 16 +++++++------- client/options.go | 22 +++++++++---------- client/retry.go | 2 +- client/retry_test.go | 2 +- client/test_request.go | 2 +- cluster/cluster.go | 2 +- codec/options.go | 6 +++--- config/default.go | 10 ++++----- config/default_test.go | 4 ++-- config/options.go | 10 ++++----- event.go | 2 +- flow/default.go | 12 +++++------ flow/flow.go | 2 +- flow/options.go | 10 ++++----- fsm/fsm_test.go | 2 +- go.mod | 12 +++++------ logger/options.go | 2 +- logger/slog/slog.go | 6 +++--- logger/slog/slog_test.go | 6 +++--- logger/unwrap/unwrap.go | 2 +- logger/unwrap/unwrap_test.go | 2 +- micro.go | 30 +++++++++++++------------- micro_test.go | 4 ++-- network/network.go | 4 ++-- network/options.go | 14 ++++++------ network/transport/memory.go | 6 +++--- network/transport/options.go | 8 +++---- network/transport/transport.go | 2 +- network/tunnel/broker/broker.go | 10 ++++----- network/tunnel/options.go | 10 ++++----- network/tunnel/transport/listener.go | 4 ++-- network/tunnel/transport/transport.go | 4 ++-- network/tunnel/tunnel.go | 2 +- options.go | 22 +++++++++---------- profiler/http/http.go | 2 +- profiler/pprof/pprof.go | 2 +- proxy/options.go | 10 ++++----- proxy/proxy.go | 2 +- register/memory/memory.go | 6 +++--- register/memory/memory_test.go | 2 +- register/options.go | 8 +++---- register/register.go | 2 +- resolver/dns/dns.go | 2 +- resolver/dnssrv/dnssrv.go | 2 +- resolver/http/http.go | 2 +- resolver/noop/noop.go | 2 +- resolver/registry/registry.go | 4 ++-- resolver/static/static.go | 2 +- router/options.go | 6 +++--- router/route.go | 2 +- selector/random/random.go | 4 ++-- selector/random/random_test.go | 2 +- selector/roundrobin/roundrobin.go | 4 ++-- selector/roundrobin/roundrobin_test.go | 2 +- server/errors.go | 2 +- server/errors_test.go | 2 +- server/noop.go | 20 ++++++++--------- server/noop_test.go | 12 +++++------ server/options.go | 20 ++++++++--------- server/registry.go | 8 +++---- server/server.go | 4 ++-- service.go | 22 +++++++++---------- service_test.go | 20 ++++++++--------- store/memory/memory.go | 4 ++-- store/memory/memory_test.go | 2 +- store/noop.go | 4 ++-- store/options.go | 12 +++++------ sync/options.go | 6 +++--- tracer/memory/memory.go | 4 ++-- tracer/memory/memory_test.go | 6 +++--- tracer/noop.go | 2 +- tracer/options.go | 2 +- tracer/tracer.go | 2 +- util/dns/cache.go | 4 ++-- util/grpc/tracer.go | 2 +- util/http/clienttracer.go | 2 +- util/http/http.go | 4 ++-- util/http/http_test.go | 8 +++---- util/http/options.go | 2 +- util/http/roundtripper.go | 4 ++-- util/jitter/random.go | 2 +- util/jitter/ticker.go | 2 +- util/reflect/struct_test.go | 2 +- util/register/util.go | 4 ++-- util/register/util_test.go | 2 +- util/ring/buffer.go | 2 +- util/socket/socket.go | 2 +- util/stream/stream.go | 8 +++---- util/test/test.go | 8 +++---- util/xpool/pool.go | 4 ++-- 98 files changed, 294 insertions(+), 294 deletions(-) diff --git a/broker/broker.go b/broker/broker.go index adf4ed4a..0dfea1fb 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -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 diff --git a/broker/memory/memory.go b/broker/memory/memory.go index a6abb960..3030729d 100644 --- a/broker/memory/memory.go +++ b/broker/memory/memory.go @@ -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 { diff --git a/broker/memory/memory_test.go b/broker/memory/memory_test.go index 94729f18..737d1b98 100644 --- a/broker/memory/memory_test.go +++ b/broker/memory/memory_test.go @@ -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) { diff --git a/broker/noop.go b/broker/noop.go index c64e6b99..625ababc 100644 --- a/broker/noop.go +++ b/broker/noop.go @@ -4,7 +4,7 @@ import ( "context" "strings" - "go.unistack.org/micro/v3/options" + "go.unistack.org/micro/v4/options" ) type NoopBroker struct { diff --git a/broker/options.go b/broker/options.go index 38771e55..717fb10a 100644 --- a/broker/options.go +++ b/broker/options.go @@ -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 diff --git a/client/backoff.go b/client/backoff.go index bc36a1b4..4290d541 100644 --- a/client/backoff.go +++ b/client/backoff.go @@ -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 diff --git a/client/client.go b/client/client.go index 5a0c4f7d..4925fe93 100644 --- a/client/client.go +++ b/client/client.go @@ -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 ( diff --git a/client/lookup.go b/client/lookup.go index 5c409ba1..4c5183a1 100644 --- a/client/lookup.go +++ b/client/lookup.go @@ -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 diff --git a/client/noop.go b/client/noop.go index 02be926d..4d1d446a 100644 --- a/client/noop.go +++ b/client/noop.go @@ -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 diff --git a/client/options.go b/client/options.go index 905d8da4..fba8bd83 100644 --- a/client/options.go +++ b/client/options.go @@ -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 diff --git a/client/retry.go b/client/retry.go index a218b3fe..de0c67ad 100644 --- a/client/retry.go +++ b/client/retry.go @@ -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 diff --git a/client/retry_test.go b/client/retry_test.go index 621c427d..c23df9d6 100644 --- a/client/retry_test.go +++ b/client/retry_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "go.unistack.org/micro/v3/errors" + "go.unistack.org/micro/v4/errors" ) func TestRetryAlways(t *testing.T) { diff --git a/client/test_request.go b/client/test_request.go index a42e2f47..8a0e87e8 100644 --- a/client/test_request.go +++ b/client/test_request.go @@ -1,7 +1,7 @@ package client import ( - "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v4/codec" ) type testRequest struct { diff --git a/cluster/cluster.go b/cluster/cluster.go index 01544eb8..431d3c2e 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -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 diff --git a/codec/options.go b/codec/options.go index 3906a82c..9e03e79f 100644 --- a/codec/options.go +++ b/codec/options.go @@ -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 diff --git a/config/default.go b/config/default.go index 9bbd0af9..ac2992d0 100644 --- a/config/default.go +++ b/config/default.go @@ -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 diff --git a/config/default_test.go b/config/default_test.go index 7e57d846..3475d5f3 100644 --- a/config/default_test.go +++ b/config/default_test.go @@ -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 { diff --git a/config/options.go b/config/options.go index 43d7dcfe..9477192f 100644 --- a/config/options.go +++ b/config/options.go @@ -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 diff --git a/event.go b/event.go index d64d1f06..1e4116d6 100644 --- a/event.go +++ b/event.go @@ -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 diff --git a/flow/default.go b/flow/default.go index e07303f2..73362650 100644 --- a/flow/default.go +++ b/flow/default.go @@ -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 { diff --git a/flow/flow.go b/flow/flow.go index ed21b078..4adf023d 100644 --- a/flow/flow.go +++ b/flow/flow.go @@ -7,7 +7,7 @@ import ( "sync" "sync/atomic" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/metadata" ) var ( diff --git a/flow/options.go b/flow/options.go index 2e03b561..a40f3abd 100644 --- a/flow/options.go +++ b/flow/options.go @@ -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 diff --git a/fsm/fsm_test.go b/fsm/fsm_test.go index d39920c8..119b2906 100644 --- a/fsm/fsm_test.go +++ b/fsm/fsm_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v4/logger" ) func TestFSMStart(t *testing.T) { diff --git a/go.mod b/go.mod index 6af8b0b9..358b50f5 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/logger/options.go b/logger/options.go index 85932135..12cff7e4 100644 --- a/logger/options.go +++ b/logger/options.go @@ -8,7 +8,7 @@ import ( "slices" "time" - "go.unistack.org/micro/v3/meter" + "go.unistack.org/micro/v4/meter" ) // Option func signature diff --git a/logger/slog/slog.go b/logger/slog/slog.go index 1f6589db..0b278c57 100644 --- a/logger/slog/slog.go +++ b/logger/slog/slog.go @@ -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 ( diff --git a/logger/slog/slog_test.go b/logger/slog/slog_test.go index deb87eda..18a24297 100644 --- a/logger/slog/slog_test.go +++ b/logger/slog/slog_test.go @@ -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 diff --git a/logger/unwrap/unwrap.go b/logger/unwrap/unwrap.go index 8bab179d..685ea9e6 100644 --- a/logger/unwrap/unwrap.go +++ b/logger/unwrap/unwrap.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v4/codec" ) const sf = "0-+# " diff --git a/logger/unwrap/unwrap_test.go b/logger/unwrap/unwrap_test.go index af55db0a..2395ecaf 100644 --- a/logger/unwrap/unwrap_test.go +++ b/logger/unwrap/unwrap_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v4/codec" ) func TestUnwrap(t *testing.T) { diff --git a/micro.go b/micro.go index e2dc1e62..6163b2e1 100644 --- a/micro.go +++ b/micro.go @@ -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 { diff --git a/micro_test.go b/micro_test.go index a4d90fea..f92c223e 100644 --- a/micro_test.go +++ b/micro_test.go @@ -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) { diff --git a/network/network.go b/network/network.go index ec9bf96f..125f3a92 100644 --- a/network/network.go +++ b/network/network.go @@ -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 diff --git a/network/options.go b/network/options.go index 0430bfe9..1bf2fdaa 100644 --- a/network/options.go +++ b/network/options.go @@ -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 diff --git a/network/transport/memory.go b/network/transport/memory.go index 209e885e..6447978f 100644 --- a/network/transport/memory.go +++ b/network/transport/memory.go @@ -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 { diff --git a/network/transport/options.go b/network/transport/options.go index 723fea35..6ab32d4b 100644 --- a/network/transport/options.go +++ b/network/transport/options.go @@ -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 diff --git a/network/transport/transport.go b/network/transport/transport.go index 17b9e545..78333595 100644 --- a/network/transport/transport.go +++ b/network/transport/transport.go @@ -5,7 +5,7 @@ import ( "context" "time" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/metadata" ) var ( diff --git a/network/tunnel/broker/broker.go b/network/tunnel/broker/broker.go index 523e2d12..77ea946d 100644 --- a/network/tunnel/broker/broker.go +++ b/network/tunnel/broker/broker.go @@ -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 { diff --git a/network/tunnel/options.go b/network/tunnel/options.go index 3ae13a0e..cf8832ab 100644 --- a/network/tunnel/options.go +++ b/network/tunnel/options.go @@ -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 ( diff --git a/network/tunnel/transport/listener.go b/network/tunnel/transport/listener.go index 1a29a760..eb506e48 100644 --- a/network/tunnel/transport/listener.go +++ b/network/tunnel/transport/listener.go @@ -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 { diff --git a/network/tunnel/transport/transport.go b/network/tunnel/transport/transport.go index 9ac71e2d..4b4c0270 100644 --- a/network/tunnel/transport/transport.go +++ b/network/tunnel/transport/transport.go @@ -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 { diff --git a/network/tunnel/tunnel.go b/network/tunnel/tunnel.go index e0d8620a..f3a9ae96 100644 --- a/network/tunnel/tunnel.go +++ b/network/tunnel/tunnel.go @@ -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 diff --git a/options.go b/options.go index cee1b9bb..f83381c7 100644 --- a/options.go +++ b/options.go @@ -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 diff --git a/profiler/http/http.go b/profiler/http/http.go index b3dd7cb2..d8edb779 100644 --- a/profiler/http/http.go +++ b/profiler/http/http.go @@ -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 { diff --git a/profiler/pprof/pprof.go b/profiler/pprof/pprof.go index d96773e8..e4060487 100644 --- a/profiler/pprof/pprof.go +++ b/profiler/pprof/pprof.go @@ -9,7 +9,7 @@ import ( "sync" "time" - profile "go.unistack.org/micro/v3/profiler" + profile "go.unistack.org/micro/v4/profiler" ) type profiler struct { diff --git a/proxy/options.go b/proxy/options.go index 0b0fe0c8..f1d01271 100644 --- a/proxy/options.go +++ b/proxy/options.go @@ -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 diff --git a/proxy/proxy.go b/proxy/proxy.go index 0a209e18..bca6c47b 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -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 diff --git a/register/memory/memory.go b/register/memory/memory.go index f0bcf7f8..43518e98 100644 --- a/register/memory/memory.go +++ b/register/memory/memory.go @@ -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 ( diff --git a/register/memory/memory_test.go b/register/memory/memory_test.go index 71f4cd77..348a6c90 100644 --- a/register/memory/memory_test.go +++ b/register/memory/memory_test.go @@ -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{ diff --git a/register/options.go b/register/options.go index c2f192ef..ea967538 100644 --- a/register/options.go +++ b/register/options.go @@ -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 diff --git a/register/register.go b/register/register.go index 54342520..c9a9ebf1 100644 --- a/register/register.go +++ b/register/register.go @@ -5,7 +5,7 @@ import ( "context" "errors" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/metadata" ) const ( diff --git a/resolver/dns/dns.go b/resolver/dns/dns.go index 35c80c67..596be278 100644 --- a/resolver/dns/dns.go +++ b/resolver/dns/dns.go @@ -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 diff --git a/resolver/dnssrv/dnssrv.go b/resolver/dnssrv/dnssrv.go index 8b786824..e5985ac4 100644 --- a/resolver/dnssrv/dnssrv.go +++ b/resolver/dnssrv/dnssrv.go @@ -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 diff --git a/resolver/http/http.go b/resolver/http/http.go index f32e791c..756d816b 100644 --- a/resolver/http/http.go +++ b/resolver/http/http.go @@ -8,7 +8,7 @@ import ( "net/http" "net/url" - "go.unistack.org/micro/v3/resolver" + "go.unistack.org/micro/v4/resolver" ) // nolint: golint,revive diff --git a/resolver/noop/noop.go b/resolver/noop/noop.go index c6d94a20..a61a2f3f 100644 --- a/resolver/noop/noop.go +++ b/resolver/noop/noop.go @@ -2,7 +2,7 @@ package noop import ( - "go.unistack.org/micro/v3/resolver" + "go.unistack.org/micro/v4/resolver" ) // Resolver contains noop resolver diff --git a/resolver/registry/registry.go b/resolver/registry/registry.go index 5f55e7a0..93579d9f 100644 --- a/resolver/registry/registry.go +++ b/resolver/registry/registry.go @@ -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 diff --git a/resolver/static/static.go b/resolver/static/static.go index 9da00f5c..391b7cfa 100644 --- a/resolver/static/static.go +++ b/resolver/static/static.go @@ -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 diff --git a/router/options.go b/router/options.go index 09e1045a..978e3dbd 100644 --- a/router/options.go +++ b/router/options.go @@ -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 diff --git a/router/route.go b/router/route.go index 94a7aaf9..97986bdf 100644 --- a/router/route.go +++ b/router/route.go @@ -3,7 +3,7 @@ package router import ( "hash/fnv" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/metadata" ) var ( diff --git a/selector/random/random.go b/selector/random/random.go index 9941ae16..49e4d34c 100644 --- a/selector/random/random.go +++ b/selector/random/random.go @@ -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{} diff --git a/selector/random/random_test.go b/selector/random/random_test.go index 08a00f74..a43989a2 100644 --- a/selector/random/random_test.go +++ b/selector/random/random_test.go @@ -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) { diff --git a/selector/roundrobin/roundrobin.go b/selector/roundrobin/roundrobin.go index c7db8811..e4cbf394 100644 --- a/selector/roundrobin/roundrobin.go +++ b/selector/roundrobin/roundrobin.go @@ -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 diff --git a/selector/roundrobin/roundrobin_test.go b/selector/roundrobin/roundrobin_test.go index fa80d637..a1f0d0e5 100644 --- a/selector/roundrobin/roundrobin_test.go +++ b/selector/roundrobin/roundrobin_test.go @@ -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) { diff --git a/server/errors.go b/server/errors.go index 637998f7..a41eb616 100644 --- a/server/errors.go +++ b/server/errors.go @@ -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 diff --git a/server/errors_test.go b/server/errors_test.go index ffd9bf19..51d0c9cb 100644 --- a/server/errors_test.go +++ b/server/errors_test.go @@ -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) { diff --git a/server/noop.go b/server/noop.go index a8ca50a6..74d57409 100644 --- a/server/noop.go +++ b/server/noop.go @@ -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 diff --git a/server/noop_test.go b/server/noop_test.go index d6706e61..2752e6ff 100644 --- a/server/noop_test.go +++ b/server/noop_test.go @@ -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 { diff --git a/server/options.go b/server/options.go index 2ff25a75..597d9746 100644 --- a/server/options.go +++ b/server/options.go @@ -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 diff --git a/server/registry.go b/server/registry.go index fbd34f66..a6d34fed 100644 --- a/server/registry.go +++ b/server/registry.go @@ -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 ( diff --git a/server/server.go b/server/server.go index 6d7b0d5b..4648a0f8 100644 --- a/server/server.go +++ b/server/server.go @@ -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 diff --git a/service.go b/service.go index b5b053f8..7ba61843 100644 --- a/service.go +++ b/service.go @@ -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() { diff --git a/service_test.go b/service_test.go index 47df5dbe..32370619 100644 --- a/service_test.go +++ b/service_test.go @@ -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) { diff --git a/store/memory/memory.go b/store/memory/memory.go index 47c88ce0..7183fdc3 100644 --- a/store/memory/memory.go +++ b/store/memory/memory.go @@ -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 diff --git a/store/memory/memory_test.go b/store/memory/memory_test.go index 598f00eb..2e6f031a 100644 --- a/store/memory/memory_test.go +++ b/store/memory/memory_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "go.unistack.org/micro/v3/store" + "go.unistack.org/micro/v4/store" ) type testHook struct { diff --git a/store/noop.go b/store/noop.go index a4e07baf..d8c4bb92 100644 --- a/store/noop.go +++ b/store/noop.go @@ -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) diff --git a/store/options.go b/store/options.go index 712ec5d5..4f460253 100644 --- a/store/options.go +++ b/store/options.go @@ -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 diff --git a/sync/options.go b/sync/options.go index b964d2cb..010fc36b 100644 --- a/sync/options.go +++ b/sync/options.go @@ -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 diff --git a/tracer/memory/memory.go b/tracer/memory/memory.go index 260755a2..e542a228 100644 --- a/tracer/memory/memory.go +++ b/tracer/memory/memory.go @@ -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) diff --git a/tracer/memory/memory_test.go b/tracer/memory/memory_test.go index bf2b88de..9799b538 100644 --- a/tracer/memory/memory_test.go +++ b/tracer/memory/memory_test.go @@ -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) { diff --git a/tracer/noop.go b/tracer/noop.go index 4bab1cd3..95d4bc0c 100644 --- a/tracer/noop.go +++ b/tracer/noop.go @@ -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) diff --git a/tracer/options.go b/tracer/options.go index 1c67e1e8..a98ab22d 100644 --- a/tracer/options.go +++ b/tracer/options.go @@ -3,7 +3,7 @@ package tracer import ( "context" - "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v4/logger" ) type SpanStatus int diff --git a/tracer/tracer.go b/tracer/tracer.go index e1cd2411..b7c463c3 100644 --- a/tracer/tracer.go +++ b/tracer/tracer.go @@ -4,7 +4,7 @@ package tracer import ( "context" - "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v4/logger" ) var ( diff --git a/util/dns/cache.go b/util/dns/cache.go index f9b06bde..75fa3452 100644 --- a/util/dns/cache.go +++ b/util/dns/cache.go @@ -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. diff --git a/util/grpc/tracer.go b/util/grpc/tracer.go index 413b4652..d2b35c17 100644 --- a/util/grpc/tracer.go +++ b/util/grpc/tracer.go @@ -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" diff --git a/util/http/clienttracer.go b/util/http/clienttracer.go index 85cb393c..c7297d40 100644 --- a/util/http/clienttracer.go +++ b/util/http/clienttracer.go @@ -23,7 +23,7 @@ import ( "strings" "sync" - "go.unistack.org/micro/v3/tracer" + "go.unistack.org/micro/v4/tracer" ) const ( diff --git a/util/http/http.go b/util/http/http.go index 571effbf..7229b1fb 100644 --- a/util/http/http.go +++ b/util/http/http.go @@ -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 diff --git a/util/http/http_test.go b/util/http/http_test.go index 6547f215..a55fbfb3 100644 --- a/util/http/http_test.go +++ b/util/http/http_test.go @@ -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) { diff --git a/util/http/options.go b/util/http/options.go index 961fcf82..e0ef0d23 100644 --- a/util/http/options.go +++ b/util/http/options.go @@ -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 { diff --git a/util/http/roundtripper.go b/util/http/roundtripper.go index da7f9c8b..b90f887f 100644 --- a/util/http/roundtripper.go +++ b/util/http/roundtripper.go @@ -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 { diff --git a/util/jitter/random.go b/util/jitter/random.go index 83ef5315..c9875ae8 100644 --- a/util/jitter/random.go +++ b/util/jitter/random.go @@ -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 diff --git a/util/jitter/ticker.go b/util/jitter/ticker.go index b5b86f70..7ba70f90 100644 --- a/util/jitter/ticker.go +++ b/util/jitter/ticker.go @@ -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 diff --git a/util/reflect/struct_test.go b/util/reflect/struct_test.go index 89be6de3..fc23443b 100644 --- a/util/reflect/struct_test.go +++ b/util/reflect/struct_test.go @@ -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) { diff --git a/util/register/util.go b/util/register/util.go index 7163a634..9d31a330 100644 --- a/util/register/util.go +++ b/util/register/util.go @@ -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 { diff --git a/util/register/util_test.go b/util/register/util_test.go index cea37b72..c0979210 100644 --- a/util/register/util_test.go +++ b/util/register/util_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "go.unistack.org/micro/v3/register" + "go.unistack.org/micro/v4/register" ) func TestRemove(t *testing.T) { diff --git a/util/ring/buffer.go b/util/ring/buffer.go index ab931a83..2ed9f047 100644 --- a/util/ring/buffer.go +++ b/util/ring/buffer.go @@ -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 diff --git a/util/socket/socket.go b/util/socket/socket.go index 0ae12b4a..b36036e6 100644 --- a/util/socket/socket.go +++ b/util/socket/socket.go @@ -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 diff --git a/util/stream/stream.go b/util/stream/stream.go index 04b2d274..eacff167 100644 --- a/util/stream/stream.go +++ b/util/stream/stream.go @@ -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 diff --git a/util/test/test.go b/util/test/test.go index 5a328b53..4e59226d 100644 --- a/util/test/test.go +++ b/util/test/test.go @@ -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" diff --git a/util/xpool/pool.go b/util/xpool/pool.go index d38b3a08..d6181ca4 100644 --- a/util/xpool/pool.go +++ b/util/xpool/pool.go @@ -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 (