Move selector to client/selector

This commit is contained in:
Asim Aslam 2019-06-21 15:13:54 +01:00
parent c350e19552
commit ca5acba0c6
28 changed files with 21 additions and 21 deletions

View File

@ -9,7 +9,7 @@ import (
api "github.com/micro/go-micro/api/proto" api "github.com/micro/go-micro/api/proto"
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/errors" "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/util/ctx" "github.com/micro/go-micro/util/ctx"
) )

View File

@ -10,7 +10,7 @@ import (
api "github.com/micro/go-micro/api/proto" api "github.com/micro/go-micro/api/proto"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
func requestToProto(r *http.Request) (*api.Request, error) { func requestToProto(r *http.Request) (*api.Request, error) {

View File

@ -10,7 +10,7 @@ import (
"github.com/micro/go-micro/api" "github.com/micro/go-micro/api"
"github.com/micro/go-micro/api/handler" "github.com/micro/go-micro/api/handler"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
const ( const (

View File

@ -19,7 +19,7 @@ import (
"github.com/micro/go-micro/codec/protorpc" "github.com/micro/go-micro/codec/protorpc"
"github.com/micro/go-micro/errors" "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/util/ctx" "github.com/micro/go-micro/util/ctx"
) )

View File

@ -13,7 +13,7 @@ import (
"github.com/micro/go-micro/api" "github.com/micro/go-micro/api"
"github.com/micro/go-micro/api/handler" "github.com/micro/go-micro/api/handler"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
const ( const (

View File

@ -16,7 +16,7 @@ import (
"github.com/micro/go-micro/errors" "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/metadata" "github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"
"google.golang.org/grpc" "google.golang.org/grpc"

View File

@ -10,7 +10,7 @@ import (
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/memory" "github.com/micro/go-micro/registry/memory"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
pgrpc "google.golang.org/grpc" pgrpc "google.golang.org/grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld" pb "google.golang.org/grpc/examples/helloworld/helloworld"
) )

View File

@ -7,7 +7,7 @@ import (
"github.com/micro/go-micro/broker" "github.com/micro/go-micro/broker"
"github.com/micro/go-micro/codec" "github.com/micro/go-micro/codec"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"
) )

View File

@ -17,7 +17,7 @@ import (
"github.com/micro/go-micro/errors" "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/metadata" "github.com/micro/go-micro/metadata"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"
) )

View File

@ -8,7 +8,7 @@ import (
"github.com/micro/go-micro/errors" "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/registry/memory" "github.com/micro/go-micro/registry/memory"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
func newTestRegistry() registry.Registry { func newTestRegistry() registry.Registry {

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
type dnsSelector struct { type dnsSelector struct {

View File

@ -4,7 +4,7 @@ import (
"context" "context"
"time" "time"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
// Set the registry cache ttl // Set the registry cache ttl

View File

@ -2,7 +2,7 @@
package registry package registry
import ( import (
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
// NewSelector returns a new registry selector // NewSelector returns a new registry selector

View File

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
// staticSelector is a static selector // staticSelector is a static selector

View File

@ -32,9 +32,9 @@ import (
rmem "github.com/micro/go-micro/registry/memory" rmem "github.com/micro/go-micro/registry/memory"
// selectors // selectors
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/selector/dns" "github.com/micro/go-micro/client/selector/dns"
"github.com/micro/go-micro/selector/static" "github.com/micro/go-micro/client/selector/static"
// transports // transports
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"

View File

@ -6,7 +6,7 @@ import (
"github.com/micro/go-micro/broker" "github.com/micro/go-micro/broker"
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/server" "github.com/micro/go-micro/server"
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"
) )

View File

@ -9,7 +9,7 @@ import (
"github.com/micro/go-micro/client" "github.com/micro/go-micro/client"
"github.com/micro/go-micro/config/cmd" "github.com/micro/go-micro/config/cmd"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
"github.com/micro/go-micro/server" "github.com/micro/go-micro/server"
"github.com/micro/go-micro/transport" "github.com/micro/go-micro/transport"
) )

View File

@ -4,7 +4,7 @@ import (
"net/http" "net/http"
"github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
func NewRoundTripper(opts ...Option) http.RoundTripper { func NewRoundTripper(opts ...Option) http.RoundTripper {

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"github.com/micro/go-micro/selector" "github.com/micro/go-micro/client/selector"
) )
type roundTripper struct { type roundTripper struct {