mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-07 17:10:51 +08:00
remove v5
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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)
|
||||
|
@@ -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() {
|
||||
|
@@ -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() {
|
||||
|
@@ -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() {
|
||||
|
@@ -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.
|
||||
|
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/grandcat/zeroconf"
|
||||
"github.com/smallnest/rpcx/v5/log"
|
||||
"github.com/smallnest/rpcx/log"
|
||||
)
|
||||
|
||||
type serviceMeta struct {
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -3,7 +3,7 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/smallnest/rpcx/v5/share"
|
||||
"github.com/smallnest/rpcx/share"
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
|
||||
|
@@ -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{}
|
||||
|
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"net"
|
||||
|
||||
"github.com/smallnest/rpcx/v5/protocol"
|
||||
"github.com/smallnest/rpcx/protocol"
|
||||
)
|
||||
|
||||
// pluginContainer implements PluginContainer interface.
|
||||
|
@@ -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"
|
||||
)
|
||||
|
||||
|
@@ -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 (
|
||||
|
@@ -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.
|
||||
|
@@ -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) {
|
||||
|
@@ -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() {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"github.com/smallnest/rpcx/v5/util"
|
||||
"github.com/smallnest/rpcx/util"
|
||||
)
|
||||
|
||||
// Compressor defines a common compression interface.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/smallnest/rpcx/v5/util"
|
||||
"github.com/smallnest/rpcx/util"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@@ -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()
|
||||
|
@@ -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 (
|
||||
|
@@ -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"
|
||||
)
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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 {
|
||||
|
@@ -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
|
||||
|
@@ -3,7 +3,7 @@ package serverplugin
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/smallnest/rpcx/v5/protocol"
|
||||
"github.com/smallnest/rpcx/protocol"
|
||||
)
|
||||
|
||||
var aliasAppliedKey = "__aliasAppliedKey"
|
||||
|
@@ -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() {
|
||||
|
@@ -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) {
|
||||
|
@@ -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() {
|
||||
|
@@ -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) {
|
||||
|
@@ -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() {
|
||||
|
@@ -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 (
|
||||
|
@@ -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!!!!
|
||||
|
@@ -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.
|
||||
|
@@ -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"
|
||||
)
|
||||
|
||||
|
@@ -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{}
|
||||
|
@@ -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"
|
||||
)
|
||||
|
||||
|
@@ -6,7 +6,7 @@ package serverplugin
|
||||
// "reflect"
|
||||
// "runtime"
|
||||
|
||||
// "github.com/smallnest/rpcx/v5/protocol"
|
||||
// "github.com/smallnest/rpcx/protocol"
|
||||
// "golang.org/x/net/trace"
|
||||
// )
|
||||
|
||||
|
@@ -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() {
|
||||
|
@@ -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) {
|
||||
|
@@ -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 (
|
||||
|
@@ -9,7 +9,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/smallnest/rpcx/v5/tool/xgen/parser"
|
||||
"github.com/smallnest/rpcx/tool/xgen/parser"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user