nats discovery
This commit is contained in:
parent
1561d0c81e
commit
3e7f8513eb
@ -86,10 +86,10 @@ func (a *API) ListenRouter(exec func(msg map[string]interface{})) {
|
|||||||
go NewNATSCaller().ListenNats(DISCOVERY.GenerateKey("api"), exec)
|
go NewNATSCaller().ListenNats(DISCOVERY.GenerateKey("api"), exec)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *API) SubscribeRouter() {
|
func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
|
||||||
nats := NewNATSCaller()
|
nats := NewNATSCaller()
|
||||||
discovery := map[string]interface{}{}
|
discovery := map[string]interface{}{}
|
||||||
for _, info := range beego.BeeApp.Handlers.GetAllControllerInfo() {
|
for _, info := range infos {
|
||||||
methods := []string{}
|
methods := []string{}
|
||||||
for k := range info.GetMethod() {
|
for k := range info.GetMethod() {
|
||||||
methods = append(methods, k)
|
methods = append(methods, k)
|
||||||
|
Loading…
Reference in New Issue
Block a user