DISCOVERY

This commit is contained in:
mr
2026-01-27 12:49:51 +01:00
parent 4d57767005
commit 9af8d15672
2 changed files with 4 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ func (a *API) GetState() (State, int, error) {
}
func (a *API) ListenRouter(exec func(msg map[string]string)) {
go NewNATSCaller().ListenNats(DISCOVERY.GenerateKey(), map[NATSMethod]func(msg map[string]string){
go NewNATSCaller().ListenNats(map[NATSMethod]func(msg map[string]string){
DISCOVERY: exec,
})
}
@@ -113,7 +113,7 @@ func (a *API) SubscribeRouter(infos []*beego.ControllerInfo) {
}
}
}
go nats.SetNATSPub("api", DISCOVERY, discovery)
go nats.SetNATSPub(DISCOVERY, discovery)
}
// CheckRemotePeer checks the state of a remote peer