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

@@ -51,3 +51,5 @@ func (w *WorkflowResource) ConvertToPricedResource(t tools.DataType, selectedIns
CreatorID: w.CreatorID, CreatorID: w.CreatorID,
}, nil // TODO ??? }, nil // TODO ???
} }
// TODO : as instanciated resource !

View File

@@ -92,7 +92,7 @@ func (a *API) GetState() (State, int, error) {
} }
func (a *API) ListenRouter(exec func(msg map[string]string)) { 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, 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 // CheckRemotePeer checks the state of a remote peer