From 18eb0d9e5ce695b5136dd7e8088be49482766cb2 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Fri, 28 Apr 2023 22:29:18 +0300 Subject: [PATCH] move to micro v4 Signed-off-by: Vasiliy Tolstov --- README.md | 4 ++-- go.mod | 6 +++--- go.sum | 10 ++-------- http.go | 18 +++++++++--------- message.go | 4 ++-- options.go | 4 ++-- request.go | 4 ++-- stream.go | 8 ++++---- util.go | 8 ++++---- 9 files changed, 30 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 564d4bd..2b23578 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ This plugin is a http client for micro. ## Overview The http client wraps `net/http` to provide a robust micro client with service discovery, load balancing and streaming. -It complies with the [micro.Client](https://godoc.org/go.unistack.org/micro-client-http/v3#Client) interface. +It complies with the [micro.Client](https://godoc.org/go.unistack.org/micro-client-http/v4#Client) interface. ## Usage ### Use directly ```go -import "go.unistack.org/micro-client-http/v3" +import "go.unistack.org/micro-client-http/v4" service := micro.NewService( micro.Name("my.service"), diff --git a/go.mod b/go.mod index 4f0bd11..3393dc1 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ -module go.unistack.org/micro-client-http/v3 +module go.unistack.org/micro-client-http/v4 -go 1.18 +go 1.19 -require go.unistack.org/micro/v3 v3.10.16 +require go.unistack.org/micro/v4 v4.0.1 diff --git a/go.sum b/go.sum index af3467d..ff93cdc 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,2 @@ -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/silas/dag v0.0.0-20211117232152-9d50aa809f35/go.mod h1:7RTUFBdIRC9nZ7/3RyRNH1bdqIShrDejd1YbLwgPS+I= -go.unistack.org/micro/v3 v3.10.16 h1:2er/SKKYbV60M+UuJM4eYCF0MZYAIq/yNUrAbTfgq8Q= -go.unistack.org/micro/v3 v3.10.16/go.mod h1:uMAc0U/x7dmtICCrblGf0ZLgYegu3VwQAquu+OFCw1Q= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +go.unistack.org/micro/v4 v4.0.1 h1:xo1IxbVfgh8i0eY0VeYa3cbb13u5n/Mxnp3FOgWD4Jo= +go.unistack.org/micro/v4 v4.0.1/go.mod h1:p/J5UcSJjfHsWGT31uKoghQ5rUQZzQJBAFy+Z4+ZVMs= diff --git a/http.go b/http.go index 22150b8..35c8495 100644 --- a/http.go +++ b/http.go @@ -1,5 +1,5 @@ // Package http provides a http client -package http // import "go.unistack.org/micro-client-http/v3" +package http // import "go.unistack.org/micro-client-http/v4" import ( "bufio" @@ -15,14 +15,14 @@ import ( "sync" "time" - "go.unistack.org/micro/v3/broker" - "go.unistack.org/micro/v3/client" - "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/selector" - rutil "go.unistack.org/micro/v3/util/reflect" + "go.unistack.org/micro/v4/broker" + "go.unistack.org/micro/v4/client" + "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/selector" + rutil "go.unistack.org/micro/v4/util/reflect" ) var DefaultContentType = "application/json" diff --git a/message.go b/message.go index 5b7f95a..c356af0 100644 --- a/message.go +++ b/message.go @@ -1,8 +1,8 @@ package http import ( - "go.unistack.org/micro/v3/client" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/client" + "go.unistack.org/micro/v4/metadata" ) type httpMessage struct { diff --git a/options.go b/options.go index 0e24695..3590a05 100644 --- a/options.go +++ b/options.go @@ -4,8 +4,8 @@ import ( "net" "net/http" - "go.unistack.org/micro/v3/client" - "go.unistack.org/micro/v3/metadata" + "go.unistack.org/micro/v4/client" + "go.unistack.org/micro/v4/metadata" ) var ( diff --git a/request.go b/request.go index 00c23a4..0622422 100644 --- a/request.go +++ b/request.go @@ -1,8 +1,8 @@ package http import ( - "go.unistack.org/micro/v3/client" - "go.unistack.org/micro/v3/codec" + "go.unistack.org/micro/v4/client" + "go.unistack.org/micro/v4/codec" ) type httpRequest struct { diff --git a/stream.go b/stream.go index 7c70b50..fbd0d8c 100644 --- a/stream.go +++ b/stream.go @@ -9,10 +9,10 @@ import ( "net/http" "sync" - "go.unistack.org/micro/v3/client" - "go.unistack.org/micro/v3/codec" - "go.unistack.org/micro/v3/errors" - "go.unistack.org/micro/v3/logger" + "go.unistack.org/micro/v4/client" + "go.unistack.org/micro/v4/codec" + "go.unistack.org/micro/v4/errors" + "go.unistack.org/micro/v4/logger" ) // Implements the streamer interface diff --git a/util.go b/util.go index f5fcf36..96a0e2f 100644 --- a/util.go +++ b/util.go @@ -10,10 +10,10 @@ import ( "strings" "sync" - "go.unistack.org/micro/v3/client" - "go.unistack.org/micro/v3/errors" - "go.unistack.org/micro/v3/logger" - rutil "go.unistack.org/micro/v3/util/reflect" + "go.unistack.org/micro/v4/client" + "go.unistack.org/micro/v4/errors" + "go.unistack.org/micro/v4/logger" + rutil "go.unistack.org/micro/v4/util/reflect" ) var ( -- 2.45.2