initial v4
Some checks failed
test / test (push) Failing after 1m53s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-05-13 06:25:11 +03:00
parent 290f8a1f9a
commit f253aacfa1
73 changed files with 579 additions and 1534 deletions

94
.github/workflows/job_sync.yml vendored Normal file
View File

@@ -0,0 +1,94 @@
name: sync
on:
schedule:
- cron: '*/5 * * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sync:
if: github.server_url != 'https://github.com'
runs-on: ubuntu-latest
steps:
- name: init
run: |
git config --global user.email "vtolstov <vtolstov@users.noreply.github.com>"
git config --global user.name "github-actions[bot]"
echo "machine git.unistack.org login vtolstov password ${{ secrets.TOKEN_GITEA }}" >> /root/.netrc
echo "machine github.com login vtolstov password ${{ secrets.TOKEN_GITHUB }}" >> /root/.netrc
- name: check master
id: check_master
run: |
src_hash=$(git ls-remote https://github.com/${GITHUB_REPOSITORY} refs/heads/master | cut -f1)
dst_hash=$(git ls-remote ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} refs/heads/master | cut -f1)
echo "src_hash=$src_hash"
echo "dst_hash=$dst_hash"
if [ "$src_hash" != "$dst_hash" ]; then
echo "sync_needed=true" >> $GITHUB_OUTPUT
else
echo "sync_needed=false" >> $GITHUB_OUTPUT
fi
- name: sync master
if: steps.check_master.outputs.sync_needed == 'true'
run: |
git clone --filter=blob:none --filter=tree:0 --branch master --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo
cd repo
git remote add --no-tags --fetch --track master upstream https://github.com/${GITHUB_REPOSITORY}
git pull --rebase upstream master
git push upstream master --progress
git push origin master --progress
cd ../
rm -rf repo
- name: check v3
id: check_v3
run: |
src_hash=$(git ls-remote https://github.com/${GITHUB_REPOSITORY} refs/heads/v3 | cut -f1)
dst_hash=$(git ls-remote ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} refs/heads/v3 | cut -f1)
echo "src_hash=$src_hash"
echo "dst_hash=$dst_hash"
if [ "$src_hash" != "$dst_hash" ]; then
echo "sync_needed=true" >> $GITHUB_OUTPUT
else
echo "sync_needed=false" >> $GITHUB_OUTPUT
fi
- name: sync v3
if: steps.check_v3.outputs.sync_needed == 'true'
run: |
git clone --filter=blob:none --filter=tree:0 --branch v3 --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo
cd repo
git remote add --no-tags --fetch --track v3 upstream https://github.com/${GITHUB_REPOSITORY}
git pull --rebase upstream v3
git push upstream v3 --progress
git push origin v3 --progress
cd ../
rm -rf repo
- name: check v4
id: check_v4
run: |
src_hash=$(git ls-remote https://github.com/${GITHUB_REPOSITORY} refs/heads/v4 | cut -f1)
dst_hash=$(git ls-remote ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} refs/heads/v4 | cut -f1)
echo "src_hash=$src_hash"
echo "dst_hash=$dst_hash"
if [ "$src_hash" != "$dst_hash" ]; then
echo "sync_needed=true" >> $GITHUB_OUTPUT
else
echo "sync_needed=false" >> $GITHUB_OUTPUT
fi
- name: sync v4
if: steps.check_v4.outputs.sync_needed == 'true'
run: |
git clone --filter=blob:none --filter=tree:0 --branch v4 --single-branch ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} repo
cd repo
git remote add --no-tags --fetch --track v4 upstream https://github.com/${GITHUB_REPOSITORY}
git pull --rebase upstream v4
git push upstream v4 --progress
git push origin v4 --progress
cd ../
rm -rf repo

View File

@@ -6,7 +6,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
) )
func TestStoreRegex(t *testing.T) { func TestStoreRegex(t *testing.T) {

View File

@@ -14,25 +14,25 @@ import (
"testing" "testing"
"time" "time"
rpc "go.unistack.org/micro-api-handler-rpc/v3" rpc "go.unistack.org/micro-api-handler-rpc/v4"
rregister "go.unistack.org/micro-api-router-register/v3" rregister "go.unistack.org/micro-api-router-register/v4"
rstatic "go.unistack.org/micro-api-router-static/v3" rstatic "go.unistack.org/micro-api-router-static/v4"
gcli "go.unistack.org/micro-client-grpc/v3" gcli "go.unistack.org/micro-client-grpc/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
regRouter "go.unistack.org/micro-router-register/v3" regRouter "go.unistack.org/micro-router-register/v4"
gsrv "go.unistack.org/micro-server-grpc/v3" gsrv "go.unistack.org/micro-server-grpc/v4"
gpb "go.unistack.org/micro-tests/server/grpc/gproto" gpb "go.unistack.org/micro-tests/server/grpc/gproto"
pb "go.unistack.org/micro-tests/server/grpc/proto" pb "go.unistack.org/micro-tests/server/grpc/proto"
"go.unistack.org/micro/v3/api" "go.unistack.org/micro/v4/api"
"go.unistack.org/micro/v3/api/handler" "go.unistack.org/micro/v4/api/handler"
"go.unistack.org/micro/v3/api/router" "go.unistack.org/micro/v4/api/router"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
rt "go.unistack.org/micro/v3/router" rt "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
// server is used to implement helloworld.GreeterServer. // server is used to implement helloworld.GreeterServer.

View File

@@ -10,12 +10,12 @@ import (
"time" "time"
kg "github.com/twmb/franz-go/pkg/kgo" kg "github.com/twmb/franz-go/pkg/kgo"
kgo "go.unistack.org/micro-broker-kgo/v3" kgo "go.unistack.org/micro-broker-kgo/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v4/metadata"
) )
var ( var (

View File

@@ -6,17 +6,17 @@ import (
"context" "context"
"testing" "testing"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
bmemory "go.unistack.org/micro/v3/broker/memory" bmemory "go.unistack.org/micro/v4/broker/memory"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/client/grpc" "go.unistack.org/micro/v4/client/grpc"
tmemory "go.unistack.org/micro/v3/network/transport/memory" tmemory "go.unistack.org/micro/v4/network/transport/memory"
rmemory "go.unistack.org/micro/v3/register/memory" rmemory "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
rtreg "go.unistack.org/micro/v3/router/register" rtreg "go.unistack.org/micro/v4/router/register"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
grpcsrv "go.unistack.org/micro/v3/server/grpc" grpcsrv "go.unistack.org/micro/v4/server/grpc"
cw "go.unistack.org/micro/v3/util/client" cw "go.unistack.org/micro/v4/util/client"
) )
type TestFoo struct{} type TestFoo struct{}

View File

@@ -8,10 +8,10 @@ import (
"net" "net"
"testing" "testing"
drpc "go.unistack.org/micro-client-drpc/v3" drpc "go.unistack.org/micro-client-drpc/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
pb "go.unistack.org/micro-tests/client/drpc/proto" pb "go.unistack.org/micro-tests/client/drpc/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"storj.io/drpc/drpcmux" "storj.io/drpc/drpcmux"
"storj.io/drpc/drpcserver" "storj.io/drpc/drpcserver"
) )

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,8 +6,8 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testServiceClient struct { type testServiceClient struct {

View File

@@ -9,8 +9,8 @@ package helloworld
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/client/grpc/proto" proto "go.unistack.org/micro-tests/client/grpc/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
metadata "go.unistack.org/micro/v3/metadata" metadata "go.unistack.org/micro/v4/metadata"
) )
var ( var (

View File

@@ -7,9 +7,9 @@ package helloworld
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/client/grpc/proto" proto "go.unistack.org/micro-tests/client/grpc/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
metadata "go.unistack.org/micro/v3/metadata" metadata "go.unistack.org/micro/v4/metadata"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testClient struct { type testClient struct {

View File

@@ -8,15 +8,15 @@ import (
"testing" "testing"
"time" "time"
grpc "go.unistack.org/micro-client-grpc/v3" grpc "go.unistack.org/micro-client-grpc/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
regRouter "go.unistack.org/micro-router-register/v3" regRouter "go.unistack.org/micro-router-register/v4"
pb "go.unistack.org/micro-tests/client/grpc/proto" pb "go.unistack.org/micro-tests/client/grpc/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
pgrpc "google.golang.org/grpc" pgrpc "google.golang.org/grpc"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
@@ -82,9 +82,6 @@ func TestGRPCClient(t *testing.T) {
{ {
ID: "test-1", ID: "test-1",
Address: l.Addr().String(), Address: l.Addr().String(),
Metadata: map[string]string{
"protocol": "grpc",
},
}, },
}, },
}); err != nil { }); err != nil {

View File

@@ -11,15 +11,15 @@ import (
"net/http" "net/http"
"testing" "testing"
mhttp "go.unistack.org/micro-client-http/v3" mhttp "go.unistack.org/micro-client-http/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
pb "go.unistack.org/micro-tests/client/http/proto" pb "go.unistack.org/micro-tests/client/http/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"google.golang.org/protobuf/types/known/wrapperspb" "google.golang.org/protobuf/types/known/wrapperspb"
) )
@@ -151,9 +151,6 @@ func TestHTTPClient(t *testing.T) {
{ {
ID: "test.service.1", ID: "test.service.1",
Address: l.Addr().String(), Address: l.Addr().String(),
Metadata: map[string]string{
"protocol": "http",
},
}, },
}, },
}); err != nil { }); err != nil {
@@ -315,9 +312,6 @@ func TestHTTPClientStream(t *testing.T) {
{ {
ID: "test.service.1", ID: "test.service.1",
Address: l.Addr().String(), Address: l.Addr().String(),
Metadata: map[string]string{
"protocol": "http",
},
}, },
}, },
}); err != nil { }); err != nil {

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,10 +6,10 @@ package pb
import ( import (
context "context" context "context"
v31 "go.unistack.org/micro-client-http/v3" v31 "go.unistack.org/micro-client-http/v4"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
http "net/http" http "net/http"
) )

View File

@@ -5,11 +5,11 @@ import (
"testing" "testing"
"time" "time"
"go.unistack.org/micro-client-mock/v3" "go.unistack.org/micro-client-mock/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
pb "go.unistack.org/micro-tests/client/mock/proto" pb "go.unistack.org/micro-tests/client/mock/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
) )
func TestCallWithoutError(t *testing.T) { func TestCallWithoutError(t *testing.T) {

View File

@@ -3,8 +3,8 @@ package pb
import ( import (
context "context" context "context"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var GithubName = "Github" var GithubName = "Github"

View File

@@ -4,10 +4,10 @@ import (
context "context" context "context"
http "net/http" http "net/http"
v3 "go.unistack.org/micro-client-http/v3" v3 "go.unistack.org/micro-client-http/v4"
v31 "go.unistack.org/micro-server-http/v3" v31 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type githubClient struct { type githubClient struct {

View File

@@ -3,8 +3,8 @@ package codec
import ( import (
"testing" "testing"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
"go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v4/codec"
) )
func TestFrame(t *testing.T) { func TestFrame(t *testing.T) {

View File

@@ -1,3 +1,3 @@
package codec package codec
//go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v3) -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto" //go:generate sh -c "protoc -I./proto -I. -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v4) -I$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) --go_out=paths=source_relative:./proto --go-micro_out=components='micro|http',debug=true,paths=source_relative:./proto proto/test.proto"

View File

@@ -7,7 +7,7 @@
package pb package pb
import ( import (
codec "go.unistack.org/micro/v3/codec" codec "go.unistack.org/micro/v4/codec"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect" reflect "reflect"

View File

@@ -8,8 +8,8 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
codec "go.unistack.org/micro/v3/codec" codec "go.unistack.org/micro/v4/codec"
) )
var ( var (

View File

@@ -6,10 +6,10 @@ package pb
import ( import (
context "context" context "context"
_ "go.unistack.org/micro-client-http/v3" _ "go.unistack.org/micro-client-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
codec "go.unistack.org/micro/v3/codec" codec "go.unistack.org/micro/v4/codec"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testClient struct { type testClient struct {

View File

@@ -4,17 +4,17 @@ import (
"context" "context"
"testing" "testing"
gclient "go.unistack.org/micro-client-grpc/v3" gclient "go.unistack.org/micro-client-grpc/v4"
// protocodec "go.unistack.org/micro-codec-proto/v3" // protocodec "go.unistack.org/micro-codec-proto/v4"
protocodec "go.unistack.org/micro-codec-segmentio/v3/proto" protocodec "go.unistack.org/micro-codec-segmentio/v4/proto"
regRouter "go.unistack.org/micro-router-register/v3" regRouter "go.unistack.org/micro-router-register/v4"
gserver "go.unistack.org/micro-server-grpc/v3" gserver "go.unistack.org/micro-server-grpc/v4"
gpb "go.unistack.org/micro-tests/codec/segmentio/proto" gpb "go.unistack.org/micro-tests/codec/segmentio/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
type testServer struct{} type testServer struct{}

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,8 +6,8 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testClient struct { type testClient struct {

View File

@@ -7,9 +7,9 @@ import (
"testing" "testing"
"time" "time"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
consul "go.unistack.org/micro-config-consul/v3" consul "go.unistack.org/micro-config-consul/v4"
"go.unistack.org/micro/v3/config" "go.unistack.org/micro/v4/config"
) )
type Cfg struct { type Cfg struct {

View File

@@ -5,8 +5,8 @@ import (
"os" "os"
"testing" "testing"
envconfig "go.unistack.org/micro-config-env/v3" envconfig "go.unistack.org/micro-config-env/v4"
"go.unistack.org/micro/v3/config" "go.unistack.org/micro/v4/config"
) )
type Config struct { type Config struct {

View File

@@ -6,9 +6,9 @@ import (
"os" "os"
"testing" "testing"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
vault "go.unistack.org/micro-config-vault/v3" vault "go.unistack.org/micro-config-vault/v4"
"go.unistack.org/micro/v3/config" "go.unistack.org/micro/v4/config"
) )
type Config struct { type Config struct {

View File

@@ -6,19 +6,19 @@ import (
"testing" "testing"
"time" "time"
httpcli "go.unistack.org/micro-client-http/v3" httpcli "go.unistack.org/micro-client-http/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v4"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
pb "go.unistack.org/micro-tests/flow/proto" pb "go.unistack.org/micro-tests/flow/proto"
"go.unistack.org/micro/v3" "go.unistack.org/micro/v4"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/flow" "go.unistack.org/micro/v4/flow"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v3/meter" "go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
"go.unistack.org/micro/v3/store" "go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v3/tracer" "go.unistack.org/micro/v4/tracer"
) )
type handler struct{} type handler struct{}

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,10 +6,10 @@ package pb
import ( import (
context "context" context "context"
v31 "go.unistack.org/micro-client-http/v3" v31 "go.unistack.org/micro-client-http/v4"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
http "net/http" http "net/http"
time "time" time "time"
) )

105
go.mod
View File

@@ -1,49 +1,50 @@
module go.unistack.org/micro-tests module go.unistack.org/micro-tests
go 1.23.4 go 1.24.0
require ( require (
github.com/jmoiron/sqlx v1.4.0 github.com/jmoiron/sqlx v1.4.0
github.com/opentracing/opentracing-go v1.2.0 github.com/opentracing/opentracing-go v1.2.0
github.com/stretchr/testify v1.10.0 github.com/stretchr/testify v1.10.0
github.com/twmb/franz-go v1.18.0 github.com/twmb/franz-go v1.18.1
github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-client-go v2.30.0+incompatible
go.unistack.org/micro-broker-kgo/v3 v3.8.51 go.unistack.org/micro-broker-kgo/v4 v4.0.1
go.unistack.org/micro-client-grpc/v3 v3.11.10 go.unistack.org/micro-client-grpc/v4 v4.1.0
go.unistack.org/micro-client-http/v3 v3.9.15 go.unistack.org/micro-client-http/v4 v4.1.0
go.unistack.org/micro-client-mock/v3 v3.0.1 go.unistack.org/micro-client-mock/v4 v4.1.0
go.unistack.org/micro-codec-json/v3 v3.10.3 go.unistack.org/micro-codec-json/v4 v4.0.0
go.unistack.org/micro-codec-jsonpb/v3 v3.10.6 go.unistack.org/micro-codec-jsonpb/v4 v4.0.1
go.unistack.org/micro-codec-proto/v3 v3.10.3 go.unistack.org/micro-codec-proto/v4 v4.0.0
go.unistack.org/micro-codec-segmentio/v3 v3.10.5 go.unistack.org/micro-codec-segmentio/v4 v4.1.0
go.unistack.org/micro-codec-urlencode/v3 v3.10.4 go.unistack.org/micro-codec-urlencode/v4 v4.0.0
go.unistack.org/micro-codec-xml/v3 v3.10.2 go.unistack.org/micro-codec-xml/v4 v4.0.0
go.unistack.org/micro-config-consul/v3 v3.8.6 go.unistack.org/micro-config-consul/v4 v4.0.4
go.unistack.org/micro-config-env/v3 v3.8.7 go.unistack.org/micro-config-env/v4 v4.0.3
go.unistack.org/micro-config-vault/v3 v3.8.9 go.unistack.org/micro-config-vault/v4 v4.0.4
go.unistack.org/micro-meter-prometheus/v3 v3.8.17 go.unistack.org/micro-meter-prometheus/v4 v4.1.0
go.unistack.org/micro-meter-victoriametrics/v3 v3.8.9 go.unistack.org/micro-meter-victoriametrics/v4 v4.1.0
go.unistack.org/micro-proto/v3 v3.4.1 go.unistack.org/micro-proto/v3 v3.4.1
go.unistack.org/micro-router-register/v3 v3.10.1 go.unistack.org/micro-router-register/v4 v4.1.0
go.unistack.org/micro-server-grpc/v3 v3.10.28 go.unistack.org/micro-server-grpc/v4 v4.1.2
go.unistack.org/micro-server-http/v3 v3.11.38 go.unistack.org/micro-server-http/v3 v3.11.38
go.unistack.org/micro-server-tcp/v3 v3.10.3 go.unistack.org/micro-server-http/v4 v4.1.2
go.unistack.org/micro-tracer-opentracing/v3 v3.10.23 go.unistack.org/micro-server-tcp/v4 v4.1.0
go.unistack.org/micro-wrapper-recovery/v3 v3.9.0 go.unistack.org/micro-tracer-opentracing/v4 v4.0.8
go.unistack.org/micro-wrapper-sql/v3 v3.10.15 go.unistack.org/micro-wrapper-recovery/v4 v4.1.0
go.unistack.org/micro/v3 v3.11.38 go.unistack.org/micro-wrapper-sql/v4 v4.1.0
golang.org/x/net v0.34.0 go.unistack.org/micro/v4 v4.1.13
google.golang.org/grpc v1.69.4 golang.org/x/net v0.40.0
google.golang.org/protobuf v1.36.3 google.golang.org/grpc v1.72.0
google.golang.org/protobuf v1.36.6
modernc.org/sqlite v1.34.2 modernc.org/sqlite v1.34.2
storj.io/drpc v0.0.34 storj.io/drpc v0.0.34
) )
require ( require (
dario.cat/mergo v1.0.1 // indirect dario.cat/mergo v1.0.2 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/KimMachineGun/automemlimit v0.7.0 // indirect github.com/KimMachineGun/automemlimit v0.7.2 // indirect
github.com/VictoriaMetrics/metrics v1.35.2 // indirect
github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect
github.com/ash3in/uuidv8 v1.2.0 // indirect github.com/ash3in/uuidv8 v1.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
@@ -52,11 +53,13 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.18.0 // indirect github.com/fatih/color v1.18.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect github.com/fatih/structtag v1.2.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/goccy/go-yaml v1.17.1 // indirect
github.com/google/gnostic v0.7.0 // indirect github.com/google/gnostic v0.7.0 // indirect
github.com/google/gnostic-models v0.6.9 // indirect github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/consul/api v1.31.0 // indirect github.com/hashicorp/consul/api v1.31.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect
@@ -65,17 +68,15 @@ require (
github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8 // indirect github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/serf v0.10.2 // indirect github.com/hashicorp/serf v0.10.2 // indirect
github.com/hashicorp/vault/api v1.15.0 // indirect github.com/hashicorp/vault/api v1.16.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/matoous/go-nanoid v1.5.1 // indirect github.com/matoous/go-nanoid v1.5.1 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
@@ -87,32 +88,36 @@ require (
github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_golang v1.21.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect github.com/segmentio/asm v1.2.0 // indirect
github.com/segmentio/encoding v0.4.1 // indirect github.com/segmentio/encoding v0.4.1 // indirect
github.com/silas/dag v0.0.0-20220518035006-a7e85ada93c5 // indirect github.com/spf13/cast v1.8.0 // indirect
github.com/twmb/franz-go/pkg/kadm v1.14.0 // indirect
github.com/twmb/franz-go/pkg/kmsg v1.9.0 // indirect github.com/twmb/franz-go/pkg/kmsg v1.9.0 // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/valyala/fastrand v1.1.0 // indirect github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect github.com/valyala/histogram v1.2.0 // indirect
github.com/zeebo/errs v1.4.0 // indirect github.com/zeebo/errs v1.4.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.uber.org/atomic v1.11.0 // indirect go.uber.org/atomic v1.11.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/automaxprocs v1.6.0 // indirect
go.unistack.org/metrics v0.0.1 // indirect go.unistack.org/micro-client-http/v3 v3.9.15 // indirect
go.unistack.org/micro-wrapper-requestid/v3 v3.9.3 // indirect go.unistack.org/micro-proto/v4 v4.1.0 // indirect
golang.org/x/crypto v0.32.0 // indirect go.unistack.org/micro-wrapper-requestid/v4 v4.1.0 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect go.unistack.org/micro/v3 v3.11.38 // indirect
golang.org/x/sys v0.29.0 // indirect go.unistack.org/protoc-gen-go-micro/v4 v4.0.15 // indirect
golang.org/x/text v0.21.0 // indirect golang.org/x/crypto v0.38.0 // indirect
golang.org/x/time v0.9.0 // indirect golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect golang.org/x/mod v0.24.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/tools v0.33.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
modernc.org/libc v1.55.3 // indirect modernc.org/libc v1.55.3 // indirect

1336
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@ import (
"testing" "testing"
pb "go.unistack.org/micro-tests/client/grpc/proto" pb "go.unistack.org/micro-tests/client/grpc/proto"
"go.unistack.org/micro/v3/logger/unwrap" "go.unistack.org/micro/v4/logger/unwrap"
"google.golang.org/protobuf/types/known/wrapperspb" "google.golang.org/protobuf/types/known/wrapperspb"
) )

View File

@@ -5,10 +5,10 @@ import (
"context" "context"
"testing" "testing"
prometheus "go.unistack.org/micro-meter-prometheus/v3" prometheus "go.unistack.org/micro-meter-prometheus/v4"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v3/meter" "go.unistack.org/micro/v4/meter"
) )
func TestWrapper(t *testing.T) { func TestWrapper(t *testing.T) {

View File

@@ -5,10 +5,10 @@ import (
"context" "context"
"testing" "testing"
victoriametrics "go.unistack.org/micro-meter-victoriametrics/v3" victoriametrics "go.unistack.org/micro-meter-victoriametrics/v4"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v3/meter" "go.unistack.org/micro/v4/meter"
) )
func TestWrapper(t *testing.T) { func TestWrapper(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package pb
import ( import (
"testing" "testing"
cp "go.unistack.org/micro-codec-proto/v3" cp "go.unistack.org/micro-codec-proto/v4"
) )
func TestMarshalUnmarshal(t *testing.T) { func TestMarshalUnmarshal(t *testing.T) {

View File

@@ -1,7 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
INC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) INC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v4)
INC_CODEC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v3) INC_CODEC=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro/v4)
ARGS="-I${INC}" ARGS="-I${INC}"
CODEC_ARGS="-I${INC_CODEC}" CODEC_ARGS="-I${INC_CODEC}"

View File

@@ -9,7 +9,7 @@ package pb
import ( import (
context "context" context "context"
codec "go.unistack.org/micro-proto/v3/codec" codec "go.unistack.org/micro-proto/v3/codec"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,11 +6,11 @@ package pb
import ( import (
context "context" context "context"
v31 "go.unistack.org/micro-client-http/v3" v31 "go.unistack.org/micro-client-http/v4"
codec "go.unistack.org/micro-proto/v3/codec" codec "go.unistack.org/micro-proto/v3/codec"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
http "net/http" http "net/http"
) )

View File

@@ -13,12 +13,12 @@ import (
"testing" "testing"
"time" "time"
// drpccli "go.unistack.org/micro-client-drpc/v3" // drpccli "go.unistack.org/micro-client-drpc/v4"
grpccli "go.unistack.org/micro-client-grpc/v3" grpccli "go.unistack.org/micro-client-grpc/v4"
httpcli "go.unistack.org/micro-client-http/v3" httpcli "go.unistack.org/micro-client-http/v4"
jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
// mdpb "go.unistack.org/micro-tests/server/combo/mdpb" // mdpb "go.unistack.org/micro-tests/server/combo/mdpb"
mgpb "go.unistack.org/micro-tests/server/combo/mgpb" mgpb "go.unistack.org/micro-tests/server/combo/mgpb"
mhpb "go.unistack.org/micro-tests/server/combo/mhpb" mhpb "go.unistack.org/micro-tests/server/combo/mhpb"
@@ -26,12 +26,12 @@ import (
// ndpb "go.unistack.org/micro-tests/server/combo/ndpb" // ndpb "go.unistack.org/micro-tests/server/combo/ndpb"
ngpb "go.unistack.org/micro-tests/server/combo/ngpb" ngpb "go.unistack.org/micro-tests/server/combo/ngpb"
pb "go.unistack.org/micro-tests/server/combo/proto" pb "go.unistack.org/micro-tests/server/combo/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/codec" "go.unistack.org/micro/v4/codec"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v4/metadata"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
"golang.org/x/net/http2" "golang.org/x/net/http2"
"golang.org/x/net/http2/h2c" "golang.org/x/net/http2/h2c"
"google.golang.org/grpc" "google.golang.org/grpc"

View File

@@ -10,20 +10,20 @@ import (
"strings" "strings"
"testing" "testing"
grpccli "go.unistack.org/micro-client-grpc/v3" grpccli "go.unistack.org/micro-client-grpc/v4"
httpcli "go.unistack.org/micro-client-http/v3" httpcli "go.unistack.org/micro-client-http/v4"
jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
grpcsrv "go.unistack.org/micro-server-grpc/v3" grpcsrv "go.unistack.org/micro-server-grpc/v4"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
mgpb "go.unistack.org/micro-tests/server/combo/mgpb" mgpb "go.unistack.org/micro-tests/server/combo/mgpb"
mhpb "go.unistack.org/micro-tests/server/combo/mhpb" mhpb "go.unistack.org/micro-tests/server/combo/mhpb"
ngpb "go.unistack.org/micro-tests/server/combo/ngpb" ngpb "go.unistack.org/micro-tests/server/combo/ngpb"
pb "go.unistack.org/micro-tests/server/combo/proto" pb "go.unistack.org/micro-tests/server/combo/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
"golang.org/x/net/http2" "golang.org/x/net/http2"
"golang.org/x/net/http2/h2c" "golang.org/x/net/http2/h2c"
"google.golang.org/grpc" "google.golang.org/grpc"

View File

@@ -9,7 +9,7 @@ package pb
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/server/combo/proto" proto "go.unistack.org/micro-tests/server/combo/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -7,8 +7,8 @@ package pb
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/server/combo/proto" proto "go.unistack.org/micro-tests/server/combo/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testClient struct { type testClient struct {

View File

@@ -9,7 +9,7 @@ package pb
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/server/combo/proto" proto "go.unistack.org/micro-tests/server/combo/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,11 +6,11 @@ package pb
import ( import (
context "context" context "context"
v31 "go.unistack.org/micro-client-http/v3" v31 "go.unistack.org/micro-client-http/v4"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
proto "go.unistack.org/micro-tests/server/combo/proto" proto "go.unistack.org/micro-tests/server/combo/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
http "net/http" http "net/http"
) )

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -9,8 +9,8 @@ package helloworld
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/server/grpc/proto" proto "go.unistack.org/micro-tests/server/grpc/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
metadata "go.unistack.org/micro/v3/metadata" metadata "go.unistack.org/micro/v4/metadata"
) )
var ( var (

View File

@@ -7,9 +7,9 @@ package helloworld
import ( import (
context "context" context "context"
proto "go.unistack.org/micro-tests/server/grpc/proto" proto "go.unistack.org/micro-tests/server/grpc/proto"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
metadata "go.unistack.org/micro/v3/metadata" metadata "go.unistack.org/micro/v4/metadata"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
) )
type testClient struct { type testClient struct {

View File

@@ -7,23 +7,23 @@ import (
"net/http" "net/http"
"testing" "testing"
gclient "go.unistack.org/micro-client-grpc/v3" gclient "go.unistack.org/micro-client-grpc/v4"
jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v4"
protocodec "go.unistack.org/micro-codec-proto/v3" protocodec "go.unistack.org/micro-codec-proto/v4"
regRouter "go.unistack.org/micro-router-register/v3" regRouter "go.unistack.org/micro-router-register/v4"
gserver "go.unistack.org/micro-server-grpc/v3" gserver "go.unistack.org/micro-server-grpc/v4"
httpsrv "go.unistack.org/micro-server-http/v3"
health "go.unistack.org/micro-server-http/v3/handler/health" health "go.unistack.org/micro-server-http/v3/handler/health"
httpsrv "go.unistack.org/micro-server-http/v4"
gpb "go.unistack.org/micro-tests/server/grpc/gproto" gpb "go.unistack.org/micro-tests/server/grpc/gproto"
pb "go.unistack.org/micro-tests/server/grpc/proto" pb "go.unistack.org/micro-tests/server/grpc/proto"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v4/metadata"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/encoding/gzip" "google.golang.org/grpc/encoding/gzip"

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"net/http" "net/http"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
pb "go.unistack.org/micro-tests/client/http/proto" pb "go.unistack.org/micro-tests/client/http/proto"
) )

View File

@@ -15,19 +15,19 @@ import (
"sync" "sync"
"testing" "testing"
httpcli "go.unistack.org/micro-client-http/v3" httpcli "go.unistack.org/micro-client-http/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v3" jsonpbcodec "go.unistack.org/micro-codec-jsonpb/v4"
urlencodecodec "go.unistack.org/micro-codec-urlencode/v3" urlencodecodec "go.unistack.org/micro-codec-urlencode/v4"
xmlcodec "go.unistack.org/micro-codec-xml/v3" xmlcodec "go.unistack.org/micro-codec-xml/v4"
vmeter "go.unistack.org/micro-meter-victoriametrics/v3" vmeter "go.unistack.org/micro-meter-victoriametrics/v4"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
meterhandler "go.unistack.org/micro-server-http/v3/handler/meter" meterhandler "go.unistack.org/micro-server-http/v4/handler/meter"
pb "go.unistack.org/micro-tests/server/http/proto" pb "go.unistack.org/micro-tests/server/http/proto"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/metadata" "go.unistack.org/micro/v4/metadata"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
) )
@@ -146,14 +146,14 @@ func NewServerHandlerWrapper(t *testing.T) server.HookHandler {
if !ok { if !ok {
return errors.New("missing metadata") return errors.New("missing metadata")
} }
if v, ok := imd.Get("Authorization"); ok && v == "test" { if v, ok := imd.GetJoined("Authorization"); ok && v == "test" {
nmd.Set("my-key", "my-val") nmd.Set("my-key", "my-val")
nmd.Set("Content-Type", "text/xml") nmd.Set("Content-Type", "text/xml")
httpsrv.SetRspCode(ctx, http.StatusUnauthorized) httpsrv.SetRspCode(ctx, http.StatusUnauthorized)
return httpsrv.SetError(&pb.CallRsp{Rsp: "name_my_name"}) return httpsrv.SetError(&pb.CallRsp{Rsp: "name_my_name"})
} }
if v, ok := imd.Get("Test-Content-Type"); ok && v != "" { if v, ok := imd.GetJoined("Test-Content-Type"); ok && v != "" {
nmd.Set("my-key", "my-val") nmd.Set("my-key", "my-val")
nmd.Set("Content-Type", v) nmd.Set("Content-Type", v)
} }
@@ -208,7 +208,7 @@ func (h *Handler) Call(ctx context.Context, req *pb.CallReq, rsp *pb.CallRsp) er
if req.Name != "my_name" { if req.Name != "my_name" {
h.t.Fatalf("invalid req received: %#+v", req) h.t.Fatalf("invalid req received: %#+v", req)
} }
if v, ok := md.Get("Authorization"); ok && v == "test" { if v, ok := md.GetJoined("Authorization"); ok && v == "test" {
rsp.Rsp = "name_my_name" rsp.Rsp = "name_my_name"
httpsrv.SetRspCode(ctx, http.StatusUnauthorized) httpsrv.SetRspCode(ctx, http.StatusUnauthorized)
omd.Set("my-key", "my-val") omd.Set("my-key", "my-val")

View File

@@ -8,7 +8,7 @@ package pb
import ( import (
context "context" context "context"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
) )
var ( var (

View File

@@ -6,10 +6,10 @@ package pb
import ( import (
context "context" context "context"
v31 "go.unistack.org/micro-client-http/v3" v31 "go.unistack.org/micro-client-http/v4"
v3 "go.unistack.org/micro-server-http/v3" v3 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v3/client" client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v3/server" server "go.unistack.org/micro/v4/server"
http "net/http" http "net/http"
time "time" time "time"
) )

View File

@@ -8,10 +8,10 @@ import (
"testing" "testing"
"time" "time"
tcp "go.unistack.org/micro-server-tcp/v3" tcp "go.unistack.org/micro-server-tcp/v4"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
type testHandler struct { type testHandler struct {

View File

@@ -3,10 +3,10 @@ package service
import ( import (
"testing" "testing"
httpcli "go.unistack.org/micro-client-http/v3" httpcli "go.unistack.org/micro-client-http/v4"
httpsrv "go.unistack.org/micro-server-http/v3" httpsrv "go.unistack.org/micro-server-http/v4"
"go.unistack.org/micro/v3" "go.unistack.org/micro/v4"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
func TestHTTPService(t *testing.T) { func TestHTTPService(t *testing.T) {

View File

@@ -12,16 +12,16 @@ import (
"testing" "testing"
"time" "time"
"go.unistack.org/micro/v3/store/cache" "go.unistack.org/micro/v4/store/cache"
"go.unistack.org/micro/v3/store/memory" "go.unistack.org/micro/v4/store/memory"
"github.com/kr/pretty" "github.com/kr/pretty"
"go.unistack.org/micro/v3/store/cockroach" "go.unistack.org/micro/v4/store/cockroach"
"go.unistack.org/micro/v3/store" "go.unistack.org/micro/v4/store"
"go.unistack.org/micro/v3/store/file" "go.unistack.org/micro/v4/store/file"
"github.com/davecgh/go-spew/spew" "github.com/davecgh/go-spew/spew"
) )

View File

@@ -9,9 +9,9 @@ import (
"syscall" "syscall"
"time" "time"
sgrpc "go.unistack.org/micro-server-grpc/v3" sgrpc "go.unistack.org/micro-server-grpc/v4"
"go.unistack.org/micro/v3" "go.unistack.org/micro/v4"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
emptypb "google.golang.org/protobuf/types/known/emptypb" emptypb "google.golang.org/protobuf/types/known/emptypb"
) )

View File

@@ -12,18 +12,18 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go"
"github.com/uber/jaeger-client-go/config" "github.com/uber/jaeger-client-go/config"
cli "go.unistack.org/micro-client-grpc/v3" cli "go.unistack.org/micro-client-grpc/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
srv "go.unistack.org/micro-server-grpc/v3" srv "go.unistack.org/micro-server-grpc/v4"
ot "go.unistack.org/micro-tracer-opentracing/v3" ot "go.unistack.org/micro-tracer-opentracing/v4"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
mt "go.unistack.org/micro/v3/tracer" mt "go.unistack.org/micro/v4/tracer"
) )
type Test interface { type Test interface {

View File

@@ -4,7 +4,7 @@ import (
"testing" "testing"
pb "go.unistack.org/micro-tests/util/reflect/proto" pb "go.unistack.org/micro-tests/util/reflect/proto"
rutil "go.unistack.org/micro/v3/util/reflect" rutil "go.unistack.org/micro/v4/util/reflect"
) )
func TestFieldName(t *testing.T) { func TestFieldName(t *testing.T) {

View File

@@ -9,9 +9,9 @@ import (
"github.com/sony/gobreaker" "github.com/sony/gobreaker"
"go.unistack.org/micro/register/memory" "go.unistack.org/micro/register/memory"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
) )
func TestBreaker(t *testing.T) { func TestBreaker(t *testing.T) {

View File

@@ -8,10 +8,10 @@ import (
"testing" "testing"
"github.com/afex/hystrix-go/hystrix" "github.com/afex/hystrix-go/hystrix"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
"go.unistack.org/micro/register/memory" "go.unistack.org/micro/register/memory"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
) )
func TestBreaker(t *testing.T) { func TestBreaker(t *testing.T) {

View File

@@ -10,17 +10,17 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go" dto "github.com/prometheus/client_model/go"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
cli "go.unistack.org/micro-client-grpc/v3" cli "go.unistack.org/micro-client-grpc/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
promwrapper "go.unistack.org/micro-metrics-prometheus/v3" promwrapper "go.unistack.org/micro-metrics-prometheus/v4"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
srv "go.unistack.org/micro-server-grpc/v3" srv "go.unistack.org/micro-server-grpc/v4"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
type Test interface { type Test interface {

View File

@@ -10,14 +10,14 @@ import (
"time" "time"
"github.com/juju/ratelimit" "github.com/juju/ratelimit"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
"go.unistack.org/micro/v3/broker" "go.unistack.org/micro/v4/broker"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
"go.unistack.org/micro/v3/network/transport" "go.unistack.org/micro/v4/network/transport"
"go.unistack.org/micro/v3/register" "go.unistack.org/micro/v4/register"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
type ( type (

View File

@@ -2,19 +2,18 @@ package recovery_test
import ( import (
"context" "context"
"fmt"
"testing" "testing"
cli "go.unistack.org/micro-client-grpc/v3" cli "go.unistack.org/micro-client-grpc/v4"
jsoncodec "go.unistack.org/micro-codec-json/v3" jsoncodec "go.unistack.org/micro-codec-json/v4"
rrouter "go.unistack.org/micro-router-register/v3" rrouter "go.unistack.org/micro-router-register/v4"
srv "go.unistack.org/micro-server-grpc/v3" srv "go.unistack.org/micro-server-grpc/v4"
recwrapper "go.unistack.org/micro-wrapper-recovery/v3" recwrapper "go.unistack.org/micro-wrapper-recovery/v4"
"go.unistack.org/micro/v3/client" "go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v3/errors" "go.unistack.org/micro/v4/errors"
mregister "go.unistack.org/micro/v3/register/memory" mregister "go.unistack.org/micro/v4/register/memory"
"go.unistack.org/micro/v3/router" "go.unistack.org/micro/v4/router"
"go.unistack.org/micro/v3/server" "go.unistack.org/micro/v4/server"
) )
type Test interface { type Test interface {
@@ -92,5 +91,5 @@ func TestRecovery(t *testing.T) {
t.Fatalf("panic happens, but handler not return err") t.Fatalf("panic happens, but handler not return err")
} }
fmt.Printf("%v\n", err) // fmt.Printf("%v\n", err)
} }

View File

@@ -15,12 +15,12 @@ import (
"github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go"
"github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go"
"github.com/uber/jaeger-client-go/config" "github.com/uber/jaeger-client-go/config"
vmeter "go.unistack.org/micro-meter-victoriametrics/v3" vmeter "go.unistack.org/micro-meter-victoriametrics/v4"
ot "go.unistack.org/micro-tracer-opentracing/v3" ot "go.unistack.org/micro-tracer-opentracing/v4"
wrapper "go.unistack.org/micro-wrapper-sql/v3" wrapper "go.unistack.org/micro-wrapper-sql/v4"
"go.unistack.org/micro/v3/logger" "go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v3/meter" "go.unistack.org/micro/v4/meter"
"go.unistack.org/micro/v3/tracer" "go.unistack.org/micro/v4/tracer"
"modernc.org/sqlite" "modernc.org/sqlite"
) )