New answers tagged

0

A response to the caller is obligate in API, what you could do is when you receive a request, you keep the received information in an internal async process and send back a default response (200) just to advice the client the request has been received. Internally in BackEnd you can process the process normally, and send the answer back via some message ...


1

Well, actually, both suggestions can be used with channels, because channels are a thread-safe queues. So here is an example of 3 connections to different HTTP services run in their own goroutines and send back data to the main goroutine via a unique channel: package main import( "net" "bytes" "io" "fmt" "log" ) func reader(muxChan ...


Top 50 recent answers are included