pump version to v5.7.2

This commit is contained in:
smallnest
2020-08-06 17:25:11 +08:00
parent 75f1e2894f
commit 2b2d19376a
49 changed files with 83 additions and 83 deletions

View File

@@ -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"
)

View File

@@ -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 {

View File

@@ -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)

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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.

View File

@@ -8,7 +8,7 @@ import (
"time"
"github.com/grandcat/zeroconf"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/log"
)
type serviceMeta struct {

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/smallnest/rpcx/share"
"github.com/smallnest/rpcx/v5/share"
"go.opencensus.io/trace"
)

View File

@@ -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{}

View File

@@ -4,7 +4,7 @@ import (
"context"
"net"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/protocol"
)
// pluginContainer implements PluginContainer interface.

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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.

View File

@@ -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) {

View File

@@ -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() {

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/smallnest/rpcx
module github.com/smallnest/rpcx/v5
go 1.13

View File

@@ -1,7 +1,7 @@
package protocol
import (
"github.com/smallnest/rpcx/util"
"github.com/smallnest/rpcx/v5/util"
)
// Compressor defines a common compression interface.

View File

@@ -7,7 +7,7 @@ import (
"fmt"
"io"
"github.com/smallnest/rpcx/util"
"github.com/smallnest/rpcx/v5/util"
)
var (

View File

@@ -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()

View File

@@ -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

View File

@@ -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 (

View File

@@ -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.

View File

@@ -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"
)

View File

@@ -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) {

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 {

View File

@@ -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

View File

@@ -3,7 +3,7 @@ package serverplugin
import (
"context"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/protocol"
)
var aliasAppliedKey = "__aliasAppliedKey"

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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!!!!

View File

@@ -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.

View File

@@ -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"
)

View File

@@ -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{}

View File

@@ -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"
)

View File

@@ -6,7 +6,7 @@ package serverplugin
// "reflect"
// "runtime"
// "github.com/smallnest/rpcx/protocol"
// "github.com/smallnest/rpcx/v5/protocol"
// "golang.org/x/net/trace"
// )

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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 (

View File

@@ -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 {