nats discovery
This commit is contained in:
parent
847ef2e95c
commit
1561d0c81e
@ -94,7 +94,7 @@ func (a *API) SubscribeRouter() {
|
||||
for k := range info.GetMethod() {
|
||||
methods = append(methods, k)
|
||||
}
|
||||
path := strings.ReplaceAll(info.GetPattern(), "/oc", "/"+config.GetAppName())
|
||||
path := strings.ReplaceAll(info.GetPattern(), "/oc", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", ""))
|
||||
discovery[path] = methods
|
||||
}
|
||||
nats.SetNATSPub("api", DISCOVERY, discovery)
|
||||
|
Loading…
Reference in New Issue
Block a user