From 73fce1d8fb8d9d10a9a3810977c09b4e60e30e8b Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 17 Oct 2024 16:05:00 +0200 Subject: [PATCH] nats discovery --- tools/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/api.go b/tools/api.go index cdd7878..7b8cebd 100644 --- a/tools/api.go +++ b/tools/api.go @@ -51,14 +51,14 @@ func (s State) String() string { type API struct{} -func (a *API) Discovered() { +func (a *API) Discovered(infos []*beego.ControllerInfo) { respondToDiscovery := func(m map[string]interface{}) { if len(m) == 0 { - a.SubscribeRouter() + a.SubscribeRouter(infos) } } a.ListenRouter(respondToDiscovery) - a.SubscribeRouter() + a.SubscribeRouter(infos) } // GetState returns the state of the API