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" opentracing "github.com/opentracing/opentracing-go"
circuit "github.com/rubyist/circuitbreaker" circuit "github.com/rubyist/circuitbreaker"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
"go.opencensus.io/trace" "go.opencensus.io/trace"
) )

View File

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

View File

@@ -9,8 +9,8 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
) )
type ConnFactoryFn func(c *Client, network, address string) (net.Conn, error) 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"
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
"github.com/docker/libkv/store/consul" "github.com/docker/libkv/store/consul"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

@@ -8,7 +8,7 @@ import (
"github.com/docker/libkv" "github.com/docker/libkv"
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
"github.com/docker/libkv/store/etcd" "github.com/docker/libkv/store/etcd"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

@@ -8,7 +8,7 @@ import (
"github.com/docker/libkv" "github.com/docker/libkv"
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
etcd "github.com/smallnest/libkv-etcdv3-store" etcd "github.com/smallnest/libkv-etcdv3-store"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

@@ -7,9 +7,9 @@ import (
"reflect" "reflect"
"sync" "sync"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
) )
// InprocessClient is a in-process client for test. // InprocessClient is a in-process client for test.

View File

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

View File

@@ -4,7 +4,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
// MultipleServersDiscovery is a multiple servers service discovery. // 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/common/constant"
"github.com/nacos-group/nacos-sdk-go/model" "github.com/nacos-group/nacos-sdk-go/model"
"github.com/nacos-group/nacos-sdk-go/vo" "github.com/nacos-group/nacos-sdk-go/vo"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/util" "github.com/smallnest/rpcx/util"
) )
// NacosDiscovery is a nacos service discovery. // NacosDiscovery is a nacos service discovery.

View File

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

View File

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

View File

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

View File

@@ -5,7 +5,7 @@ import (
opentracing "github.com/opentracing/opentracing-go" opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext" "github.com/opentracing/opentracing-go/ext"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
) )
type OpenTracingPlugin struct{} type OpenTracingPlugin struct{}

View File

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

View File

@@ -7,7 +7,7 @@ import (
"github.com/abronan/valkeyrie" "github.com/abronan/valkeyrie"
"github.com/abronan/valkeyrie/store" "github.com/abronan/valkeyrie/store"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/valkeyrie/store/redis" "github.com/smallnest/valkeyrie/store/redis"
) )

View File

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

View File

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

View File

@@ -9,9 +9,9 @@ import (
"fmt" "fmt"
testutils "github.com/smallnest/rpcx/_testutils" testutils "github.com/smallnest/rpcx/_testutils"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/server" "github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
) )
func TestXClient_Thrift(t *testing.T) { func TestXClient_Thrift(t *testing.T) {

View File

@@ -8,7 +8,7 @@ import (
"github.com/docker/libkv" "github.com/docker/libkv"
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
"github.com/docker/libkv/store/zookeeper" "github.com/docker/libkv/store/zookeeper"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -12,7 +12,7 @@ import (
"unicode/utf8" "unicode/utf8"
rerrors "github.com/smallnest/rpcx/errors" 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 // Precompute the reflect type for error. Can't use error directly

View File

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

View File

@@ -14,7 +14,7 @@ import (
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
"github.com/docker/libkv/store/consul" "github.com/docker/libkv/store/consul"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

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

View File

@@ -14,7 +14,7 @@ import (
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
"github.com/docker/libkv/store/etcd" "github.com/docker/libkv/store/etcd"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

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

View File

@@ -14,7 +14,7 @@ import (
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
etcd "github.com/smallnest/libkv-etcdv3-store" etcd "github.com/smallnest/libkv-etcdv3-store"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

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

View File

@@ -7,8 +7,8 @@ import (
"github.com/rcrowley/go-metrics" "github.com/rcrowley/go-metrics"
"github.com/rcrowley/go-metrics/exp" "github.com/rcrowley/go-metrics/exp"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/server" "github.com/smallnest/rpcx/server"
) )
// MetricsPlugin has an issue. It changes seq of requests and it is wrong!!!! // 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/clients/naming_client"
"github.com/nacos-group/nacos-sdk-go/common/constant" "github.com/nacos-group/nacos-sdk-go/common/constant"
"github.com/nacos-group/nacos-sdk-go/vo" "github.com/nacos-group/nacos-sdk-go/vo"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/v5/util" "github.com/smallnest/rpcx/util"
) )
// NacosRegisterPlugin implements consul registry. // NacosRegisterPlugin implements consul registry.

View File

@@ -4,9 +4,9 @@ import (
"context" "context"
"net" "net"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/server" "github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
"go.opencensus.io/trace" "go.opencensus.io/trace"
) )

View File

@@ -7,9 +7,9 @@ import (
opentracing "github.com/opentracing/opentracing-go" opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext" "github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log" "github.com/opentracing/opentracing-go/log"
"github.com/smallnest/rpcx/v5/protocol" "github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/v5/server" "github.com/smallnest/rpcx/server"
"github.com/smallnest/rpcx/v5/share" "github.com/smallnest/rpcx/share"
) )
type OpenTracingPlugin struct{} type OpenTracingPlugin struct{}

View File

@@ -13,7 +13,7 @@ import (
"github.com/abronan/valkeyrie" "github.com/abronan/valkeyrie"
"github.com/abronan/valkeyrie/store" "github.com/abronan/valkeyrie/store"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
"github.com/smallnest/valkeyrie/store/redis" "github.com/smallnest/valkeyrie/store/redis"
) )

View File

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

View File

@@ -15,7 +15,7 @@ import (
"github.com/docker/libkv/store" "github.com/docker/libkv/store"
metrics "github.com/rcrowley/go-metrics" metrics "github.com/rcrowley/go-metrics"
"github.com/smallnest/rpcx/v5/log" "github.com/smallnest/rpcx/log"
) )
func init() { func init() {

View File

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

View File

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

View File

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