gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/client/common_test.go (about) 1 package client 2 3 import ( 4 "gitee.com/liuxuezhan/go-micro-v1.18.0/registry" 5 ) 6 7 var ( 8 // mock data 9 testData = map[string][]*registry.Service{ 10 "foo": { 11 { 12 Name: "foo", 13 Version: "1.0.0", 14 Nodes: []*registry.Node{ 15 { 16 Id: "foo-1.0.0-123", 17 Address: "localhost:9999", 18 Metadata: map[string]string{ 19 "protocol": "mucp", 20 }, 21 }, 22 { 23 Id: "foo-1.0.0-321", 24 Address: "localhost:9999", 25 Metadata: map[string]string{ 26 "protocol": "mucp", 27 }, 28 }, 29 }, 30 }, 31 { 32 Name: "foo", 33 Version: "1.0.1", 34 Nodes: []*registry.Node{ 35 { 36 Id: "foo-1.0.1-321", 37 Address: "localhost:6666", 38 Metadata: map[string]string{ 39 "protocol": "mucp", 40 }, 41 }, 42 }, 43 }, 44 { 45 Name: "foo", 46 Version: "1.0.3", 47 Nodes: []*registry.Node{ 48 { 49 Id: "foo-1.0.3-345", 50 Address: "localhost:8888", 51 Metadata: map[string]string{ 52 "protocol": "mucp", 53 }, 54 }, 55 }, 56 }, 57 }, 58 } 59 )