ExNominatim.StreamMany (ExNominatim v3.0.0)

Copy Markdown View Source

Concurrent batch dispatching across multiple query option sets.

Takes a list of keyword-list option sets and fans them out as concurrent search requests, yielding results as a lazy Stream in completion order.

Usage

opts_list = [
  [q: "Athens", limit: 1],
  [q: "Paris",  limit: 1],
  [q: "London", limit: 1]
]

ExNominatim.stream_many(opts_list, max_concurrency: 5)
|> Enum.each(fn result -> IO.inspect(result) end)

Each element in the returned stream is the full return value of Client.search/1 — either {:ok, %{status: _, body: _}} or {:error, %{code: _, descr: _}}.

Options

  • :max_concurrency — maximum number of in-flight HTTP requests (default 5).

All other keyword keys are forwarded as base options merged into each query set, allowing shared config like base_url:, format:, process:, etc.

Summary

Functions

Stream results for a list of query option sets concurrently.

Functions

stream(list_of_opts, runner_opts \\ [])

Stream results for a list of query option sets concurrently.

Accepts list_of_opts (a list of keyword lists, each being the options for a single search request) and runner_opts (keyword list of streaming parameters plus base options to merge into every query).