ReconectingUpdateSource

works.iterative.tapir.ReconectingUpdateSource
class ReconectingUpdateSource[A](updateHub: Hub[A], retrySchedule: Schedule[Any, Any, _] = ...)

Run a read-only source from server, publish whatever comes to a hub. Reconnect on failure.

Type parameters

A

type of updates

Value parameters

retrySchedule

schedule for retries, defaults to 2 seconds

updateHub

hub to publish updates to

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def run[B](source: Unit => UIO[(ZStream[Any, Throwable, B]) => ZStream[Any, Throwable, A]]): UIO[Unit]

Run the update source.

Run the update source.

It will start the process, reconnecting on failure. Meant to be forked somewhere scoped, updateSource.run.forkScoped

Attributes