update go-micro and fix client/selector usage
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -11,8 +11,9 @@ import (
|
||||
|
||||
metrics "github.com/VictoriaMetrics/metrics"
|
||||
"github.com/micro/go-micro/v2/client"
|
||||
"github.com/micro/go-micro/v2/client/selector"
|
||||
"github.com/micro/go-micro/v2/registry/memory"
|
||||
"github.com/micro/go-micro/v2/router"
|
||||
rrouter "github.com/micro/go-micro/v2/router/registry"
|
||||
"github.com/micro/go-micro/v2/server"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -38,13 +39,14 @@ func (t *testHandler) Method(ctx context.Context, req *TestRequest, rsp *TestRes
|
||||
func TestVictoriametrics(t *testing.T) {
|
||||
// setup
|
||||
registry := memory.NewRegistry()
|
||||
sel := selector.NewSelector(selector.Registry(registry))
|
||||
|
||||
name := "test"
|
||||
id := "id-1234567890"
|
||||
version := "1.2.3.4"
|
||||
|
||||
c := client.NewClient(client.Selector(sel))
|
||||
c := client.NewClient(
|
||||
client.Router(rrouter.NewRouter(router.Registry(registry))),
|
||||
)
|
||||
s := server.NewServer(
|
||||
server.Name(name),
|
||||
server.Version(version),
|
||||
|
Reference in New Issue
Block a user