@@ -78,3 +78,63 @@ func (sm Linkerd) SvcBGetPort() string {
78
78
func (sm Linkerd ) SvcCGetPort () string {
79
79
return sm .PortSvcC
80
80
}
81
+
82
+ type Istio struct {
83
+ PortSvcA string
84
+ PortSvcB string
85
+ PortSvcC string
86
+ }
87
+
88
+ func (sm Istio ) SvcAGetInternalName (namespace string ) string {
89
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_A_NAME , namespace , sm .PortSvcA )
90
+ }
91
+
92
+ func (sm Istio ) SvcBGetInternalName (namespace string ) string {
93
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_B_NAME , namespace , sm .PortSvcB )
94
+ }
95
+
96
+ func (sm Istio ) SvcCGetInternalName (namespace string ) string {
97
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_C_NAME , namespace , sm .PortSvcC )
98
+ }
99
+
100
+ func (sm Istio ) SvcAGetPort () string {
101
+ return sm .PortSvcA
102
+ }
103
+
104
+ func (sm Istio ) SvcBGetPort () string {
105
+ return sm .PortSvcB
106
+ }
107
+
108
+ func (sm Istio ) SvcCGetPort () string {
109
+ return sm .PortSvcC
110
+ }
111
+
112
+ type OSM struct {
113
+ PortSvcA string
114
+ PortSvcB string
115
+ PortSvcC string
116
+ }
117
+
118
+ func (sm OSM ) SvcAGetInternalName (namespace string ) string {
119
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_A_NAME , namespace , sm .PortSvcA )
120
+ }
121
+
122
+ func (sm OSM ) SvcBGetInternalName (namespace string ) string {
123
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_B_NAME , namespace , sm .PortSvcB )
124
+ }
125
+
126
+ func (sm OSM ) SvcCGetInternalName (namespace string ) string {
127
+ return fmt .Sprintf ("http://%s.%s..svc.cluster.local.:%s" , SERVICE_C_NAME , namespace , sm .PortSvcC )
128
+ }
129
+
130
+ func (sm OSM ) SvcAGetPort () string {
131
+ return sm .PortSvcA
132
+ }
133
+
134
+ func (sm OSM ) SvcBGetPort () string {
135
+ return sm .PortSvcB
136
+ }
137
+
138
+ func (sm OSM ) SvcCGetPort () string {
139
+ return sm .PortSvcC
140
+ }
0 commit comments