Skip to content

Commit e44bfba

Browse files
author
lenny-intel
committed
Refactory to movefile out of /pkg and import cycle
Signed-off-by: lenny-intel <[email protected]>
1 parent c9196fb commit e44bfba

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func initializeConfiguration(useRegistry bool, useProfile string) (*Configuratio
3636
}
3737
3838
if useRegistry {
39-
registryConfig := registry.Config{
39+
registryConfig := types.Config{
4040
Host: conf.Registry.Host,
4141
Port: conf.Registry.Port,
4242
Type: conf.Registry.Type,
@@ -49,7 +49,7 @@ func initializeConfiguration(useRegistry bool, useProfile string) (*Configuratio
4949
Stem: internal.ConfigRegistryStem,
5050
}
5151
52-
registryClient, err = factory.NewRegistryClient(registryConfig)
52+
registryClient, err = registry.NewRegistryClient(registryConfig)
5353
if err != nil {
5454
return fmt.Errorf("connection to Registry could not be made: %v", err.Error())
5555
}
@@ -123,11 +123,12 @@ func listenForConfigChanges() {
123123
This code snippet shows how to get dependent service endpoint information and check status of the dependent service.
124124
```
125125
...
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+
...
128129
url := fmt.Sprintf("http://%s:%v%s", endpoint.Address, endpoint.Port, params.Path)
129130
...
130-
if registry.Client.IsServiceAvailable(params.ServiceKey) {
131+
if (*e.RegistryClient).IsServiceAvailable(params.ServiceKey) {
131132
...
132133
}
133134
}

0 commit comments

Comments
 (0)