@@ -36,7 +36,7 @@ func initializeConfiguration(useRegistry bool, useProfile string) (*Configuratio
36
36
}
37
37
38
38
if useRegistry {
39
- registryConfig := registry .Config{
39
+ registryConfig := types .Config{
40
40
Host: conf.Registry.Host,
41
41
Port: conf.Registry.Port,
42
42
Type: conf.Registry.Type,
@@ -49,7 +49,7 @@ func initializeConfiguration(useRegistry bool, useProfile string) (*Configuratio
49
49
Stem: internal.ConfigRegistryStem,
50
50
}
51
51
52
- registryClient, err = factory .NewRegistryClient(registryConfig)
52
+ registryClient, err = registry .NewRegistryClient(registryConfig)
53
53
if err != nil {
54
54
return fmt.Errorf("connection to Registry could not be made: %v", err.Error())
55
55
}
@@ -123,11 +123,12 @@ func listenForConfigChanges() {
123
123
This code snippet shows how to get dependent service endpoint information and check status of the dependent service.
124
124
```
125
125
...
126
- if registry.Client != nil {
127
- endpoint, err = registry.Client.GetServiceEndpoint(params.ServiceKey)
126
+ if e.RegistryClient != nil {
127
+ endpoint, err = (*e.RegistryClient).GetServiceEndpoint(params.ServiceKey)
128
+ ...
128
129
url := fmt.Sprintf("http://%s:%v%s", endpoint.Address, endpoint.Port, params.Path)
129
130
...
130
- if registry.Client .IsServiceAvailable(params.ServiceKey) {
131
+ if (*e.RegistryClient) .IsServiceAvailable(params.ServiceKey) {
131
132
...
132
133
}
133
134
}
0 commit comments