Sobes.tech
Junior — Middle+

Parallel document query to multiple servers

livecode

Task condition

It is necessary to write a function that simultaneously sends a query request to N identical servers, using the function search.Search(server, query). The function should return the first correct result received, without waiting for the requests to the other servers to complete. If each server returns an error, it should return the error search failed.

search.Search(server string, query string) ([]string, error)