Deprecate client/selector (#1767)
* client/{grpc,rpc}: depricate selector (wip) * {client,cmd}: remove client/selector * deprecate client/selector * router/static: fix lookup * config/cmd: add support for legacy static selector flag * config/cmd: add support for legacy dns selector flag
This commit is contained in:
@@ -8,14 +8,15 @@ import (
|
||||
|
||||
"github.com/micro/go-micro/v2/registry"
|
||||
"github.com/micro/go-micro/v2/registry/memory"
|
||||
"github.com/micro/go-micro/v2/router"
|
||||
regRouter "github.com/micro/go-micro/v2/router/registry"
|
||||
)
|
||||
|
||||
func TestRoundTripper(t *testing.T) {
|
||||
m := memory.NewRegistry()
|
||||
r := regRouter.NewRouter(router.Registry(m))
|
||||
|
||||
rt := NewRoundTripper(
|
||||
WithRegistry(m),
|
||||
)
|
||||
rt := NewRoundTripper(WithRouter(r))
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(`hello world`))
|
||||
|
Reference in New Issue
Block a user