Move selector to client/selector
This commit is contained in:
parent
c350e19552
commit
ca5acba0c6
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
@ -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 (
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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 (
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
@ -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
|
@ -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
|
@ -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
|
@ -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"
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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"
|
||||||
)
|
)
|
||||||
|
@ -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 {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user