INNER CODE UNIT · Go
result
moleculer-go/moleculer · broker/broker.go:504
result := <-broker.Call(actionName, params)
results <- callPair{label, result}
}(label, content["action"].(string), content["params"], resultChan)
}
timeoutChan := make(chan bool, 1)
go func(timeout time.Duration) {
time.Sleep(timeout)
timeoutChan <- true
}(broker.config.MCallTimeout)
results := make(map[string]moleculer.Payload)
for {
select {
case pair := <-resultChan:
results[pair.label] = pair.result
if len(results) == len(callMaps) {
result <- results