remove v5

This commit is contained in:
smallnest
2020-04-28 18:20:33 +08:00
parent 1eebab9d9c
commit c13fa98bc4
47 changed files with 75 additions and 75 deletions

View File

@@ -15,9 +15,9 @@ import (
opentracing "github.com/opentracing/opentracing-go"
circuit "github.com/rubyist/circuitbreaker"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
"go.opencensus.io/trace"
)

View File

@@ -8,8 +8,8 @@ import (
"time"
testutils "github.com/smallnest/rpcx/_testutils"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/server"
)
type Args struct {

View File

@@ -9,8 +9,8 @@ import (
"net/http"
"time"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

@@ -7,9 +7,9 @@ import (
"reflect"
"sync"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
type serviceMeta struct {

View File

@@ -4,7 +4,7 @@ import (
"sync"
"time"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/v5/util"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/util"
)
// NacosDiscovery is a nacos service discovery.

View File

@@ -6,10 +6,10 @@ import (
"io"
"sync"
"github.com/smallnest/rpcx/v5/serverplugin"
"github.com/smallnest/rpcx/serverplugin"
multierror "github.com/hashicorp/go-multierror"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/protocol"
)
// OneClient wraps servicesPath and XClients.

View File

@@ -3,7 +3,7 @@ package client
import (
"sync/atomic"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/protocol"
)
// OneClientPool is a oneclient pool with fixed size.

View File

@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/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/v5/share"
"github.com/smallnest/rpcx/share"
)
type OpenTracingPlugin struct{}

View File

@@ -4,7 +4,7 @@ import (
"context"
"net"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/valkeyrie/store/redis"
)

View File

@@ -15,9 +15,9 @@ import (
"github.com/juju/ratelimit"
ex "github.com/smallnest/rpcx/errors"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/serverplugin"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/serverplugin"
"github.com/smallnest/rpcx/share"
)
const (

View File

@@ -3,7 +3,7 @@ package client
import (
"sync/atomic"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/protocol"
)
// XClientPool is a xclient pool with fixed size.

View File

@@ -9,9 +9,9 @@ import (
"fmt"
testutils "github.com/smallnest/rpcx/_testutils"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ import (
"github.com/ChimeraCoder/gojson"
jsoniter "github.com/json-iterator/go"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/log"
)
var typeOfError = reflect.TypeOf((*error)(nil)).Elem()

View File

@@ -6,8 +6,8 @@ import (
"net/url"
"strconv"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
)
const (

View File

@@ -12,9 +12,9 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/rs/cors"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
"github.com/soheilhy/cmux"
)

View File

@@ -10,8 +10,8 @@ import (
"strings"
"github.com/rs/cors"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
)
func (s *Server) jsonrpcHandler(w http.ResponseWriter, r *http.Request) {

View File

@@ -4,8 +4,8 @@ import (
"context"
"net"
"github.com/smallnest/rpcx/v5/errors"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/errors"
"github.com/smallnest/rpcx/protocol"
)
//PluginContainer represents a plugin container that defines all methods to manage plugins.

View File

@@ -21,9 +21,9 @@ import (
"os/signal"
"syscall"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
)
// ErrServerClosed is returned by the Server's Serve, ListenAndServe after a call to Shutdown or Close.

View File

@@ -8,8 +8,8 @@ import (
"time"
testutils "github.com/smallnest/rpcx/_testutils"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
)
type Args struct {

View File

@@ -12,7 +12,7 @@ import (
"unicode/utf8"
rerrors "github.com/smallnest/rpcx/errors"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/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/v5/protocol"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

@@ -5,7 +5,7 @@ import (
"time"
metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

@@ -5,7 +5,7 @@ import (
"time"
metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

@@ -9,8 +9,8 @@ import (
"time"
"github.com/hashicorp/golang-lru"
"github.com/smallnest/rpcx/v5/log"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/server"
)
var (

View File

@@ -7,8 +7,8 @@ import (
"github.com/rcrowley/go-metrics"
"github.com/rcrowley/go-metrics/exp"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/v5/util"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/util"
)
// NacosRegisterPlugin implements consul registry.

View File

@@ -4,9 +4,9 @@ import (
"context"
"net"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/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/v5/protocol"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/v5/share"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/valkeyrie/store/redis"
)

View File

@@ -6,7 +6,7 @@ package serverplugin
// "reflect"
// "runtime"
// "github.com/smallnest/rpcx/v5/protocol"
// "github.com/smallnest/rpcx/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/v5/log"
"github.com/smallnest/rpcx/log"
)
func init() {

View File

@@ -5,7 +5,7 @@ import (
"time"
metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/server"
"github.com/smallnest/rpcx/server"
)
func TestZookeeperRegistry(t *testing.T) {

View File

@@ -1,8 +1,8 @@
package share
import (
"github.com/smallnest/rpcx/v5/codec"
"github.com/smallnest/rpcx/v5/protocol"
"github.com/smallnest/rpcx/codec"
"github.com/smallnest/rpcx/protocol"
)
const (

View File

@@ -9,7 +9,7 @@ import (
"os"
"path/filepath"
"github.com/smallnest/rpcx/v5/tool/xgen/parser"
"github.com/smallnest/rpcx/tool/xgen/parser"
)
var (