Rate limiting and response parsing shared by the provider adapters.
Rate limiting and response parsing shared by the provider adapters.
Connect and read timeout for a provider call. A stalled provider is a miss after this, not a thread held until the OS gives up.
Connect and read timeout for a provider call. A stalled provider is a miss after this, not a thread held until the OS gives up.
(enforce-rate-limit! last-request-ms min-interval-ms)Block until min-interval-ms have passed since the previous request, then
claim the slot and return its time. A waiter holds no slot while it sleeps,
so one interrupted or cancelled gives nothing up and delays no one; the price
is that waiters are not served in arrival order. No monitor is held while
sleeping, which would pin a virtual thread's carrier on JDK 21.
Block until `min-interval-ms` have passed since the previous request, then claim the slot and return its time. A waiter holds no slot while it sleeps, so one interrupted or cancelled gives nothing up and delays no one; the price is that waiters are not served in arrival order. No monitor is held while sleeping, which would pin a virtual thread's carrier on JDK 21.
(parse-response provider parse-fn item)Apply parse-fn to a provider's result item. nil item means no match.
A result without numeric :lat/:lng is a malformed response: WARN and nil.
Apply `parse-fn` to a provider's result item. nil item means no match. A result without numeric :lat/:lng is a malformed response: WARN and nil.
(query-text {:keys [address postcode house-number house-number-addition city
country]})An AddressQuery as one free-text line: "Damrak 1 A, 1012 LG, Amsterdam, Netherlands". The house number follows the address.
An AddressQuery as one free-text line: "Damrak 1 A, 1012 LG, Amsterdam, Netherlands". The house number follows the address.
(street-fields street house-number addition)The GeoResult's :street, :house-number and :house-number-addition, leaving out what the provider did not give.
The GeoResult's :street, :house-number and :house-number-addition, leaving out what the provider did not give.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |