From aad0fca6fcd1a6d8e59c329e65e629d4d2e5b937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flc=E3=82=9B?= Date: Tue, 7 Jan 2025 22:44:27 +0800 Subject: [PATCH] refactor(hyperf): migrate to monorepo structure (#578) * chore: update module versions and dependencies in versions.yaml * refactor(hyperf): migrate to monorepo structure * chore(deps): move golang.org/x/text to indirect dependencies --- go.mod | 2 +- hyperf/jet/go.mod | 18 +++++++++++++++ hyperf/jet/go.sum | 27 ++++++++++++++++++++++ hyperf/jet/middleware/logging/go.mod | 20 ++++++++++++++++ hyperf/jet/middleware/logging/go.sum | 26 +++++++++++++++++++++ hyperf/jet/middleware/logging/logging.go | 3 +-- hyperf/jet/middleware/recovery/go.mod | 19 +++++++++++++++ hyperf/jet/middleware/recovery/go.sum | 22 ++++++++++++++++++ hyperf/jet/middleware/recovery/recovery.go | 2 +- hyperf/jet/middleware/retry/go.mod | 22 ++++++++++++++++++ hyperf/jet/middleware/retry/go.sum | 21 +++++++++++++++++ hyperf/jet/middleware/retry/options.go | 4 ++-- hyperf/jet/middleware/retry/retry.go | 2 +- hyperf/jet/middleware/timeout/go.mod | 19 +++++++++++++++ hyperf/jet/middleware/timeout/go.sum | 22 ++++++++++++++++++ hyperf/jet/middleware/timeout/timeout.go | 2 +- hyperf/jet/middleware/tracing/go.mod | 20 ++++++++++++++++ hyperf/jet/middleware/tracing/go.sum | 27 ++++++++++++++++++++++ hyperf/jet/middleware/tracing/tracing.go | 3 +-- versions.yaml | 21 ++++++++--------- 20 files changed, 281 insertions(+), 21 deletions(-) create mode 100644 hyperf/jet/go.mod create mode 100644 hyperf/jet/go.sum create mode 100644 hyperf/jet/middleware/logging/go.mod create mode 100644 hyperf/jet/middleware/logging/go.sum create mode 100644 hyperf/jet/middleware/recovery/go.mod create mode 100644 hyperf/jet/middleware/recovery/go.sum create mode 100644 hyperf/jet/middleware/retry/go.mod create mode 100644 hyperf/jet/middleware/retry/go.sum create mode 100644 hyperf/jet/middleware/timeout/go.mod create mode 100644 hyperf/jet/middleware/timeout/go.sum create mode 100644 hyperf/jet/middleware/tracing/go.mod create mode 100644 hyperf/jet/middleware/tracing/go.sum diff --git a/go.mod b/go.mod index e1ad4ccd..31edcc58 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,6 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.33.0 go.opentelemetry.io/otel/trace v1.33.0 golang.org/x/term v0.28.0 - golang.org/x/text v0.21.0 google.golang.org/grpc v1.69.2 google.golang.org/protobuf v1.36.2 gorm.io/driver/mysql v1.5.7 @@ -96,6 +95,7 @@ require ( golang.org/x/net v0.34.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.29.0 // indirect + golang.org/x/text v0.21.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/hyperf/jet/go.mod b/hyperf/jet/go.mod new file mode 100644 index 00000000..5876d9b4 --- /dev/null +++ b/hyperf/jet/go.mod @@ -0,0 +1,18 @@ +module github.com/go-fries/fries/hyperf/jet/v3 + +go 1.22.10 + +require ( + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.10.0 + golang.org/x/text v0.21.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/hyperf/jet/go.sum b/hyperf/jet/go.sum new file mode 100644 index 00000000..8f39e8ed --- /dev/null +++ b/hyperf/jet/go.sum @@ -0,0 +1,27 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/logging/go.mod b/hyperf/jet/middleware/logging/go.mod new file mode 100644 index 00000000..f276b3ea --- /dev/null +++ b/hyperf/jet/middleware/logging/go.mod @@ -0,0 +1,20 @@ +module github.com/go-fries/fries/hyperf/jet/middleware/logging/v3 + +go 1.22.10 + +replace github.com/go-fries/fries/hyperf/jet/v3 => ../../ + +require ( + github.com/go-fries/fries/hyperf/jet/v3 v3.0.0 + github.com/go-kratos/kratos/v2 v2.8.3 + github.com/stretchr/testify v1.10.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/text v0.21.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/hyperf/jet/middleware/logging/go.sum b/hyperf/jet/middleware/logging/go.sum new file mode 100644 index 00000000..519e085e --- /dev/null +++ b/hyperf/jet/middleware/logging/go.sum @@ -0,0 +1,26 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-kratos/kratos/v2 v2.8.3 h1:kkNBq0gvdX+b8cbaN+p6Sdh95DgMhx7GimefXb4o7Ss= +github.com/go-kratos/kratos/v2 v2.8.3/go.mod h1:+Vfe3FzF0d+BfMdajA11jT0rAyJWublRE/seZQNZVxE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/logging/logging.go b/hyperf/jet/middleware/logging/logging.go index f82055d9..884b5095 100644 --- a/hyperf/jet/middleware/logging/logging.go +++ b/hyperf/jet/middleware/logging/logging.go @@ -4,9 +4,8 @@ import ( "context" "time" + "github.com/go-fries/fries/hyperf/jet/v3" "github.com/go-kratos/kratos/v2/log" - - "github.com/go-fries/fries/v3/hyperf/jet" ) type options struct { diff --git a/hyperf/jet/middleware/recovery/go.mod b/hyperf/jet/middleware/recovery/go.mod new file mode 100644 index 00000000..9588643f --- /dev/null +++ b/hyperf/jet/middleware/recovery/go.mod @@ -0,0 +1,19 @@ +module github.com/go-fries/fries/hyperf/jet/middleware/recovery/v3 + +go 1.22.10 + +replace github.com/go-fries/fries/hyperf/jet/v3 => ../../ + +require ( + github.com/go-fries/fries/hyperf/jet/v3 v3.0.0 + github.com/stretchr/testify v1.10.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/text v0.21.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/hyperf/jet/middleware/recovery/go.sum b/hyperf/jet/middleware/recovery/go.sum new file mode 100644 index 00000000..2369bc24 --- /dev/null +++ b/hyperf/jet/middleware/recovery/go.sum @@ -0,0 +1,22 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/recovery/recovery.go b/hyperf/jet/middleware/recovery/recovery.go index 30c3daa1..c9a8e8a3 100644 --- a/hyperf/jet/middleware/recovery/recovery.go +++ b/hyperf/jet/middleware/recovery/recovery.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/go-fries/fries/v3/hyperf/jet" + "github.com/go-fries/fries/hyperf/jet/v3" ) var DefaultHandler = func(_ context.Context, service, method string, request any, err any) error { diff --git a/hyperf/jet/middleware/retry/go.mod b/hyperf/jet/middleware/retry/go.mod new file mode 100644 index 00000000..46c5e90f --- /dev/null +++ b/hyperf/jet/middleware/retry/go.mod @@ -0,0 +1,22 @@ +module github.com/go-fries/fries/hyperf/jet/middleware/retry/v3 + +go 1.22.10 + +replace ( + github.com/go-fries/fries/hyperf/jet/middleware/timeout/v3 => ../timeout + github.com/go-fries/fries/hyperf/jet/v3 => ../../ +) + +require ( + github.com/go-fries/fries/hyperf/jet/middleware/timeout/v3 v3.0.0 + github.com/go-fries/fries/hyperf/jet/v3 v3.0.0 + github.com/stretchr/testify v1.10.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/text v0.21.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/hyperf/jet/middleware/retry/go.sum b/hyperf/jet/middleware/retry/go.sum new file mode 100644 index 00000000..9528afdd --- /dev/null +++ b/hyperf/jet/middleware/retry/go.sum @@ -0,0 +1,21 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/retry/options.go b/hyperf/jet/middleware/retry/options.go index d843fddf..ed8aceae 100644 --- a/hyperf/jet/middleware/retry/options.go +++ b/hyperf/jet/middleware/retry/options.go @@ -3,8 +3,8 @@ package retry import ( "errors" - "github.com/go-fries/fries/v3/hyperf/jet" - "github.com/go-fries/fries/v3/hyperf/jet/middleware/timeout" + "github.com/go-fries/fries/hyperf/jet/middleware/timeout/v3" + "github.com/go-fries/fries/hyperf/jet/v3" ) var DefaultAllow AllowFunc = func(err error) bool { diff --git a/hyperf/jet/middleware/retry/retry.go b/hyperf/jet/middleware/retry/retry.go index 87e20de2..e8922314 100644 --- a/hyperf/jet/middleware/retry/retry.go +++ b/hyperf/jet/middleware/retry/retry.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/go-fries/fries/v3/hyperf/jet" + "github.com/go-fries/fries/hyperf/jet/v3" ) func New(opts ...Option) jet.Middleware { diff --git a/hyperf/jet/middleware/timeout/go.mod b/hyperf/jet/middleware/timeout/go.mod new file mode 100644 index 00000000..424596db --- /dev/null +++ b/hyperf/jet/middleware/timeout/go.mod @@ -0,0 +1,19 @@ +module github.com/go-fries/fries/hyperf/jet/middleware/timeout/v3 + +go 1.22.10 + +replace github.com/go-fries/fries/hyperf/jet/v3 => ../../ + +require ( + github.com/go-fries/fries/hyperf/jet/v3 v3.0.0 + github.com/stretchr/testify v1.10.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/text v0.21.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/hyperf/jet/middleware/timeout/go.sum b/hyperf/jet/middleware/timeout/go.sum new file mode 100644 index 00000000..2369bc24 --- /dev/null +++ b/hyperf/jet/middleware/timeout/go.sum @@ -0,0 +1,22 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/timeout/timeout.go b/hyperf/jet/middleware/timeout/timeout.go index b4e41812..21f74f89 100644 --- a/hyperf/jet/middleware/timeout/timeout.go +++ b/hyperf/jet/middleware/timeout/timeout.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/go-fries/fries/v3/hyperf/jet" + "github.com/go-fries/fries/hyperf/jet/v3" ) var ( diff --git a/hyperf/jet/middleware/tracing/go.mod b/hyperf/jet/middleware/tracing/go.mod new file mode 100644 index 00000000..a350bf4e --- /dev/null +++ b/hyperf/jet/middleware/tracing/go.mod @@ -0,0 +1,20 @@ +module github.com/go-fries/fries/hyperf/jet/middleware/tracing/v3 + +go 1.22.10 + +replace github.com/go-fries/fries/hyperf/jet/v3 => ../../ + +require ( + github.com/go-fries/fries/hyperf/jet/v3 v3.0.0 + go.opentelemetry.io/otel v1.33.0 + go.opentelemetry.io/otel/trace v1.33.0 +) + +require ( + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/uuid v1.6.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/otel/metric v1.33.0 // indirect + golang.org/x/text v0.21.0 // indirect +) diff --git a/hyperf/jet/middleware/tracing/go.sum b/hyperf/jet/middleware/tracing/go.sum new file mode 100644 index 00000000..3409fdca --- /dev/null +++ b/hyperf/jet/middleware/tracing/go.sum @@ -0,0 +1,27 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/hyperf/jet/middleware/tracing/tracing.go b/hyperf/jet/middleware/tracing/tracing.go index 3e70d844..3477d539 100644 --- a/hyperf/jet/middleware/tracing/tracing.go +++ b/hyperf/jet/middleware/tracing/tracing.go @@ -5,14 +5,13 @@ import ( "net" "strconv" + "github.com/go-fries/fries/hyperf/jet/v3" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/propagation" semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" - - "github.com/go-fries/fries/v3/hyperf/jet" ) const instrumentation = "github.com/go-kratos-ecosystem/components/v2/hyperf/jet/middleware/tracing" diff --git a/versions.yaml b/versions.yaml index 1d9f56f0..7d771abb 100644 --- a/versions.yaml +++ b/versions.yaml @@ -1,14 +1,13 @@ module-sets: - stable-v4: - version: v4.3.0 + stable: + version: v3.0.0 modules: - - github.com/flc1125/go-cron/v4 - - github.com/flc1125/go-cron/crontest/v4 - - github.com/flc1125/go-cron/middleware/delayoverlapping/v4 - - github.com/flc1125/go-cron/middleware/distributednooverlapping/v4 - - github.com/flc1125/go-cron/middleware/distributednooverlapping/redismutex/v4 - - github.com/flc1125/go-cron/middleware/nooverlapping/v4 - - github.com/flc1125/go-cron/middleware/otel/v4 - - github.com/flc1125/go-cron/middleware/recovery/v4 + - github.com/go-fries/fries/v3 + - github.com/go-fries/fries/hyperf/jet/v3 + - github.com/go-fries/fries/hyperf/jet/middleware/logging/v3 + - github.com/go-fries/fries/hyperf/jet/middleware/recovery/v3 + - github.com/go-fries/fries/hyperf/jet/middleware/retry/v3 + - github.com/go-fries/fries/hyperf/jet/middleware/timeout/v3 + - github.com/go-fries/fries/hyperf/jet/middleware/tracing/v3 excluded-modules: - - github.com/flc1125/go-cron/v4/internal/tools + - github.com/go-fries/fries/internal/tools/v3