discovery clear view
This commit is contained in:
parent
3ecb0e9d96
commit
5111c9c8be
@ -3,6 +3,7 @@ package tools
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cloud.o-forge.io/core/oc-lib/config"
|
"cloud.o-forge.io/core/oc-lib/config"
|
||||||
@ -97,6 +98,7 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
|
|||||||
nats := NewNATSCaller()
|
nats := NewNATSCaller()
|
||||||
discovery := map[string][]string{}
|
discovery := map[string][]string{}
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
|
fmt.Println("DISCOVERY", info.GetPattern())
|
||||||
path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", ""))
|
path := strings.ReplaceAll(info.GetPattern(), "/oc/", "/"+strings.ReplaceAll(config.GetAppName(), "oc-", ""))
|
||||||
for k, v := range info.GetMethod() {
|
for k, v := range info.GetMethod() {
|
||||||
if discovery[path] == nil {
|
if discovery[path] == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user