diff --git a/client/client.go b/client/client.go index 7ca4739..56b1720 100644 --- a/client/client.go +++ b/client/client.go @@ -15,9 +15,9 @@ import ( opentracing "github.com/opentracing/opentracing-go" circuit "github.com/rubyist/circuitbreaker" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" "go.opencensus.io/trace" ) diff --git a/client/client_test.go b/client/client_test.go index 431d8ec..09aa472 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - testutils "github.com/smallnest/rpcx/_testutils" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/server" + testutils "github.com/smallnest/rpcx/v5/_testutils" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/server" ) type Args struct { diff --git a/client/connection.go b/client/connection.go index e4cb6fd..742a724 100644 --- a/client/connection.go +++ b/client/connection.go @@ -9,8 +9,8 @@ import ( "net/http" "time" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/share" ) type ConnFactoryFn func(c *Client, network, address string) (net.Conn, error) diff --git a/client/consul_discovery.go b/client/consul_discovery.go index 40454d6..33a7d06 100644 --- a/client/consul_discovery.go +++ b/client/consul_discovery.go @@ -8,7 +8,7 @@ import ( "github.com/docker/libkv" "github.com/docker/libkv/store" "github.com/docker/libkv/store/consul" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/client/etcd_discovery.go b/client/etcd_discovery.go index 4e2f73c..5b5214d 100644 --- a/client/etcd_discovery.go +++ b/client/etcd_discovery.go @@ -8,7 +8,7 @@ import ( "github.com/docker/libkv" "github.com/docker/libkv/store" "github.com/docker/libkv/store/etcd" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/client/etcdv3_discovery.go b/client/etcdv3_discovery.go index 5e4d7e4..169c03e 100644 --- a/client/etcdv3_discovery.go +++ b/client/etcdv3_discovery.go @@ -8,7 +8,7 @@ import ( "github.com/docker/libkv" "github.com/docker/libkv/store" etcd "github.com/smallnest/libkv-etcdv3-store" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/client/inprocess_client.go b/client/inprocess_client.go index 2efac04..4cbfd57 100644 --- a/client/inprocess_client.go +++ b/client/inprocess_client.go @@ -7,9 +7,9 @@ import ( "reflect" "sync" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" ) // InprocessClient is a in-process client for test. diff --git a/client/mdns_discovery.go b/client/mdns_discovery.go index df61078..d4efb2b 100644 --- a/client/mdns_discovery.go +++ b/client/mdns_discovery.go @@ -8,7 +8,7 @@ import ( "time" "github.com/grandcat/zeroconf" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) type serviceMeta struct { diff --git a/client/multiple_servers_discovery.go b/client/multiple_servers_discovery.go index 8d6b766..20db7b8 100644 --- a/client/multiple_servers_discovery.go +++ b/client/multiple_servers_discovery.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) // MultipleServersDiscovery is a multiple servers service discovery. diff --git a/client/nacos_discovery.go b/client/nacos_discovery.go index 45eff69..ab9117a 100644 --- a/client/nacos_discovery.go +++ b/client/nacos_discovery.go @@ -10,8 +10,8 @@ import ( "github.com/nacos-group/nacos-sdk-go/common/constant" "github.com/nacos-group/nacos-sdk-go/model" "github.com/nacos-group/nacos-sdk-go/vo" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/util" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/util" ) // NacosDiscovery is a nacos service discovery. diff --git a/client/oneclient.go b/client/oneclient.go index e0ebe26..ad7e981 100644 --- a/client/oneclient.go +++ b/client/oneclient.go @@ -6,10 +6,10 @@ import ( "io" "sync" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/share" multierror "github.com/hashicorp/go-multierror" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/protocol" ) // OneClient wraps servicesPath and XClients. diff --git a/client/oneclient_pool.go b/client/oneclient_pool.go index 0f98063..f9fd865 100644 --- a/client/oneclient_pool.go +++ b/client/oneclient_pool.go @@ -3,7 +3,7 @@ package client import ( "sync/atomic" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/protocol" ) // OneClientPool is a oneclient pool with fixed size. diff --git a/client/opencensus.go b/client/opencensus.go index c306c80..dd1c72c 100644 --- a/client/opencensus.go +++ b/client/opencensus.go @@ -3,7 +3,7 @@ package client import ( "context" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/share" "go.opencensus.io/trace" ) diff --git a/client/opentracing.go b/client/opentracing.go index 3986f77..87345a9 100644 --- a/client/opentracing.go +++ b/client/opentracing.go @@ -5,7 +5,7 @@ import ( opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/share" ) type OpenTracingPlugin struct{} diff --git a/client/plugin.go b/client/plugin.go index fadf71f..382ccdf 100644 --- a/client/plugin.go +++ b/client/plugin.go @@ -4,7 +4,7 @@ import ( "context" "net" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/protocol" ) // pluginContainer implements PluginContainer interface. diff --git a/client/redis_discovery.go b/client/redis_discovery.go index ce200dd..8a41ba8 100644 --- a/client/redis_discovery.go +++ b/client/redis_discovery.go @@ -7,7 +7,7 @@ import ( "github.com/abronan/valkeyrie" "github.com/abronan/valkeyrie/store" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" "github.com/smallnest/valkeyrie/store/redis" ) diff --git a/client/xclient.go b/client/xclient.go index 31af0d1..dbc1c37 100644 --- a/client/xclient.go +++ b/client/xclient.go @@ -14,9 +14,9 @@ import ( "time" "github.com/juju/ratelimit" - ex "github.com/smallnest/rpcx/errors" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + ex "github.com/smallnest/rpcx/v5/errors" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" "golang.org/x/sync/singleflight" ) diff --git a/client/xclient_pool.go b/client/xclient_pool.go index 11d9d91..024ca4b 100644 --- a/client/xclient_pool.go +++ b/client/xclient_pool.go @@ -3,7 +3,7 @@ package client import ( "sync/atomic" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/protocol" ) // XClientPool is a xclient pool with fixed size. diff --git a/client/xclient_test.go b/client/xclient_test.go index 74c80bd..9880398 100644 --- a/client/xclient_test.go +++ b/client/xclient_test.go @@ -8,10 +8,10 @@ import ( "fmt" - testutils "github.com/smallnest/rpcx/_testutils" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/server" - "github.com/smallnest/rpcx/share" + testutils "github.com/smallnest/rpcx/v5/_testutils" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/server" + "github.com/smallnest/rpcx/v5/share" ) func TestXClient_Thrift(t *testing.T) { diff --git a/client/zookeeper_discovery.go b/client/zookeeper_discovery.go index 4fc8c67..01662d4 100644 --- a/client/zookeeper_discovery.go +++ b/client/zookeeper_discovery.go @@ -8,7 +8,7 @@ import ( "github.com/docker/libkv" "github.com/docker/libkv/store" "github.com/docker/libkv/store/zookeeper" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/go.mod b/go.mod index 122806e..6b2351f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/smallnest/rpcx +module github.com/smallnest/rpcx/v5 go 1.13 diff --git a/protocol/compressor.go b/protocol/compressor.go index 752054c..d29aca1 100644 --- a/protocol/compressor.go +++ b/protocol/compressor.go @@ -1,7 +1,7 @@ package protocol import ( - "github.com/smallnest/rpcx/util" + "github.com/smallnest/rpcx/v5/util" ) // Compressor defines a common compression interface. diff --git a/protocol/message.go b/protocol/message.go index 9bf7296..b8bae82 100644 --- a/protocol/message.go +++ b/protocol/message.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - "github.com/smallnest/rpcx/util" + "github.com/smallnest/rpcx/v5/util" ) var ( diff --git a/reflection/server_reflection.go b/reflection/server_reflection.go index ea2f4d2..b3a3222 100644 --- a/reflection/server_reflection.go +++ b/reflection/server_reflection.go @@ -13,7 +13,7 @@ import ( "github.com/ChimeraCoder/gojson" jsoniter "github.com/json-iterator/go" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) var typeOfError = reflect.TypeOf((*error)(nil)).Elem() diff --git a/reflection/server_reflection_test.go b/reflection/server_reflection_test.go index 6bebc10..928c9c5 100644 --- a/reflection/server_reflection_test.go +++ b/reflection/server_reflection_test.go @@ -6,7 +6,7 @@ import ( "github.com/kr/pretty" - testutils "github.com/smallnest/rpcx/_testutils" + testutils "github.com/smallnest/rpcx/v5/_testutils" ) type PBArith int diff --git a/server/converter.go b/server/converter.go index a4cdf54..b3164fd 100644 --- a/server/converter.go +++ b/server/converter.go @@ -6,8 +6,8 @@ import ( "net/url" "strconv" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" ) const ( diff --git a/server/file_transfer.go b/server/file_transfer.go index 80c1f7f..e6d2949 100644 --- a/server/file_transfer.go +++ b/server/file_transfer.go @@ -8,10 +8,10 @@ import ( "sync" "time" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/share" lru "github.com/hashicorp/golang-lru" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) // FileTransferHandler handles uploading file. Must close the connection after it finished. diff --git a/server/gateway.go b/server/gateway.go index 45be3a0..4c62651 100644 --- a/server/gateway.go +++ b/server/gateway.go @@ -12,9 +12,9 @@ import ( "github.com/julienschmidt/httprouter" "github.com/rs/cors" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" "github.com/soheilhy/cmux" ) diff --git a/server/jsonrpc2.go b/server/jsonrpc2.go index fe3bf8d..272bad0 100644 --- a/server/jsonrpc2.go +++ b/server/jsonrpc2.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/rs/cors" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" ) func (s *Server) jsonrpcHandler(w http.ResponseWriter, r *http.Request) { diff --git a/server/plugin.go b/server/plugin.go index 005a84d..4617761 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -4,8 +4,8 @@ import ( "context" "net" - "github.com/smallnest/rpcx/errors" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/errors" + "github.com/smallnest/rpcx/v5/protocol" ) //PluginContainer represents a plugin container that defines all methods to manage plugins. diff --git a/server/server.go b/server/server.go index f268140..6fe35ff 100644 --- a/server/server.go +++ b/server/server.go @@ -22,9 +22,9 @@ import ( "os/signal" "syscall" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" ) // ErrServerClosed is returned by the Server's Serve, ListenAndServe after a call to Shutdown or Close. diff --git a/server/server_test.go b/server/server_test.go index c072787..264045e 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -7,9 +7,9 @@ import ( "time" - testutils "github.com/smallnest/rpcx/_testutils" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/share" + testutils "github.com/smallnest/rpcx/v5/_testutils" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/share" ) type Args struct { diff --git a/server/service.go b/server/service.go index 2d614a0..d5dd704 100644 --- a/server/service.go +++ b/server/service.go @@ -11,8 +11,8 @@ import ( "unicode" "unicode/utf8" - rerrors "github.com/smallnest/rpcx/errors" - "github.com/smallnest/rpcx/log" + rerrors "github.com/smallnest/rpcx/v5/errors" + "github.com/smallnest/rpcx/v5/log" ) // Precompute the reflect type for error. Can't use error directly diff --git a/serverplugin/alias.go b/serverplugin/alias.go index 4f59ad9..3147f5a 100644 --- a/serverplugin/alias.go +++ b/serverplugin/alias.go @@ -3,7 +3,7 @@ package serverplugin import ( "context" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/protocol" ) var aliasAppliedKey = "__aliasAppliedKey" diff --git a/serverplugin/consul.go b/serverplugin/consul.go index 2707eb1..4f5c3cf 100644 --- a/serverplugin/consul.go +++ b/serverplugin/consul.go @@ -14,7 +14,7 @@ import ( "github.com/docker/libkv/store" "github.com/docker/libkv/store/consul" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/serverplugin/consul_test.go b/serverplugin/consul_test.go index 81e32e9..fd536ee 100644 --- a/serverplugin/consul_test.go +++ b/serverplugin/consul_test.go @@ -5,7 +5,7 @@ import ( "time" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/server" + "github.com/smallnest/rpcx/v5/server" ) func TestConsulRegistry(t *testing.T) { diff --git a/serverplugin/etcd.go b/serverplugin/etcd.go index 414c0ab..8150305 100644 --- a/serverplugin/etcd.go +++ b/serverplugin/etcd.go @@ -14,7 +14,7 @@ import ( "github.com/docker/libkv/store" "github.com/docker/libkv/store/etcd" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/serverplugin/etcd_test.go b/serverplugin/etcd_test.go index ca63f8f..5af4113 100644 --- a/serverplugin/etcd_test.go +++ b/serverplugin/etcd_test.go @@ -5,7 +5,7 @@ import ( "time" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/server" + "github.com/smallnest/rpcx/v5/server" ) func TestEtcdRegistry(t *testing.T) { diff --git a/serverplugin/etcdv3.go b/serverplugin/etcdv3.go index b863e6a..9093c1c 100644 --- a/serverplugin/etcdv3.go +++ b/serverplugin/etcdv3.go @@ -14,7 +14,7 @@ import ( "github.com/docker/libkv/store" metrics "github.com/rcrowley/go-metrics" etcd "github.com/smallnest/libkv-etcdv3-store" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/serverplugin/metrics.go b/serverplugin/metrics.go index 5f779d0..fee036e 100644 --- a/serverplugin/metrics.go +++ b/serverplugin/metrics.go @@ -7,8 +7,8 @@ import ( "github.com/rcrowley/go-metrics" "github.com/rcrowley/go-metrics/exp" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/server" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/server" ) // MetricsPlugin has an issue. It changes seq of requests and it is wrong!!!! diff --git a/serverplugin/nacos.go b/serverplugin/nacos.go index 38eb6f2..99ac633 100644 --- a/serverplugin/nacos.go +++ b/serverplugin/nacos.go @@ -8,8 +8,8 @@ import ( "github.com/nacos-group/nacos-sdk-go/clients/naming_client" "github.com/nacos-group/nacos-sdk-go/common/constant" "github.com/nacos-group/nacos-sdk-go/vo" - "github.com/smallnest/rpcx/log" - "github.com/smallnest/rpcx/util" + "github.com/smallnest/rpcx/v5/log" + "github.com/smallnest/rpcx/v5/util" ) // NacosRegisterPlugin implements consul registry. diff --git a/serverplugin/opencensus.go b/serverplugin/opencensus.go index 565fa65..4ecb34d 100644 --- a/serverplugin/opencensus.go +++ b/serverplugin/opencensus.go @@ -4,9 +4,9 @@ import ( "context" "net" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/server" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/server" + "github.com/smallnest/rpcx/v5/share" "go.opencensus.io/trace" ) diff --git a/serverplugin/opentracing.go b/serverplugin/opentracing.go index f59562f..d0cfeb9 100644 --- a/serverplugin/opentracing.go +++ b/serverplugin/opentracing.go @@ -7,9 +7,9 @@ import ( opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" "github.com/opentracing/opentracing-go/log" - "github.com/smallnest/rpcx/protocol" - "github.com/smallnest/rpcx/server" - "github.com/smallnest/rpcx/share" + "github.com/smallnest/rpcx/v5/protocol" + "github.com/smallnest/rpcx/v5/server" + "github.com/smallnest/rpcx/v5/share" ) type OpenTracingPlugin struct{} diff --git a/serverplugin/redis.go b/serverplugin/redis.go index 77a4e0c..324d5af 100644 --- a/serverplugin/redis.go +++ b/serverplugin/redis.go @@ -13,7 +13,7 @@ import ( "github.com/abronan/valkeyrie" "github.com/abronan/valkeyrie/store" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" "github.com/smallnest/valkeyrie/store/redis" ) diff --git a/serverplugin/trace.go b/serverplugin/trace.go index abc3698..d99381d 100644 --- a/serverplugin/trace.go +++ b/serverplugin/trace.go @@ -6,7 +6,7 @@ package serverplugin // "reflect" // "runtime" -// "github.com/smallnest/rpcx/protocol" +// "github.com/smallnest/rpcx/v5/protocol" // "golang.org/x/net/trace" // ) diff --git a/serverplugin/zookeeper.go b/serverplugin/zookeeper.go index 72c1410..c052103 100644 --- a/serverplugin/zookeeper.go +++ b/serverplugin/zookeeper.go @@ -15,7 +15,7 @@ import ( "github.com/docker/libkv/store" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/log" + "github.com/smallnest/rpcx/v5/log" ) func init() { diff --git a/serverplugin/zookeeper_test.go b/serverplugin/zookeeper_test.go index 8c96cc6..298b3bb 100644 --- a/serverplugin/zookeeper_test.go +++ b/serverplugin/zookeeper_test.go @@ -5,7 +5,7 @@ import ( "time" metrics "github.com/rcrowley/go-metrics" - "github.com/smallnest/rpcx/server" + "github.com/smallnest/rpcx/v5/server" ) func TestZookeeperRegistry(t *testing.T) { diff --git a/share/share.go b/share/share.go index fe7cfa1..f8c9ad0 100644 --- a/share/share.go +++ b/share/share.go @@ -1,8 +1,8 @@ package share import ( - "github.com/smallnest/rpcx/codec" - "github.com/smallnest/rpcx/protocol" + "github.com/smallnest/rpcx/v5/codec" + "github.com/smallnest/rpcx/v5/protocol" ) const ( diff --git a/tool/xgen/xgen.go b/tool/xgen/xgen.go index f7e24bc..74008cb 100644 --- a/tool/xgen/xgen.go +++ b/tool/xgen/xgen.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - "github.com/smallnest/rpcx/tool/xgen/parser" + "github.com/smallnest/rpcx/v5/tool/xgen/parser" ) var ( @@ -102,8 +102,8 @@ func generate(parsers []*parser.Parser) error { fmt.Fprintln(w, ` "time"`) fmt.Fprintln(w) fmt.Fprintln(w, ` metrics "github.com/rcrowley/go-metrics"`) - fmt.Fprintln(w, ` "github.com/smallnest/rpcx/server"`) - fmt.Fprintln(w, ` "github.com/smallnest/rpcx/serverplugin"`) + fmt.Fprintln(w, ` "github.com/smallnest/rpcx/v5/server"`) + fmt.Fprintln(w, ` "github.com/smallnest/rpcx/v5/serverplugin"`) var importedPackages = make(map[string]bool) for _, p := range parsers {