FallbackWaterQualityClient

marola.water.FallbackWaterQualityClient
See theFallbackWaterQualityClient companion object
final class FallbackWaterQualityClient(primary: WaterQualityClient, backup: WaterQualityClient) extends WaterQualityClient

The primary source, then a backup when it gives nothing.

Written for IMA/SC: its JSON feed went unreachable on 2026-09-08 and Florianópolis lost every verdict, while the same agency's weekly bulletin PDF stayed up the whole time. One agency, two publication channels, and no reason for an outage in one to be a blackout for the user.

"Gives nothing" covers both a thrown failure and an empty answer, because from the map's side they are the same thing. Stacked under CachedWaterQualityClient, the order is: live feed, backup channel, last good fetch.

Attributes

Companion
object
Graph
Supertypes
trait WaterQualityClient
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def name: String
def samplingPoints: List[SamplingPoint] < Sync