1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-17 17:44:30 +02:00
go-micro/client/common_test.go

60 lines
1013 B
Go
Raw Normal View History

package client
2019-01-18 17:29:17 +00:00
import (
2024-06-04 21:40:43 +01:00
"go-micro.dev/v5/registry"
2019-01-18 17:29:17 +00:00
)
var (
2022-09-30 16:27:07 +02:00
// mock data.
testData = map[string][]*registry.Service{
"foo": {
2019-01-18 17:29:17 +00:00
{
Name: "foo",
Version: "1.0.0",
Nodes: []*registry.Node{
{
Id: "foo-1.0.0-123",
2019-07-08 08:01:42 +01:00
Address: "localhost:9999",
Metadata: map[string]string{
"protocol": "mucp",
},
2019-01-18 17:29:17 +00:00
},
{
Id: "foo-1.0.0-321",
2019-07-08 08:01:42 +01:00
Address: "localhost:9999",
Metadata: map[string]string{
"protocol": "mucp",
},
2019-01-18 17:29:17 +00:00
},
},
},
{
Name: "foo",
Version: "1.0.1",
Nodes: []*registry.Node{
{
Id: "foo-1.0.1-321",
2019-07-08 08:01:42 +01:00
Address: "localhost:6666",
Metadata: map[string]string{
"protocol": "mucp",
},
2019-01-18 17:29:17 +00:00
},
},
},
{
Name: "foo",
Version: "1.0.3",
Nodes: []*registry.Node{
{
Id: "foo-1.0.3-345",
2019-07-08 08:01:42 +01:00
Address: "localhost:8888",
Metadata: map[string]string{
"protocol": "mucp",
},
2019-01-18 17:29:17 +00:00
},
},
},
},
}
)