ResourceMirror

trait ResourceMirror[IO[_], T] extends ReconcileSource[IO, T]

ResourceMirror provides:

  • A snapshot of the current state of a set of resources
  • A stream tracking the ID of changed resources. Subscribers to this stream MUST NOT backpressure, as that could cause the watcher (and other observers) to fall behind. In practice, this is typically consumed by Dispatcher, which doesn't backpressure.
Companion:
object
trait ReconcileSource[IO, T]
trait ReconcileSourceBase[IO, T]
class Object
trait Matchable
class Any

Value members

Abstract methods

def active: IO[Map[Id[T], T]]
def activeValues: IO[List[T]]
def all: IO[ResourceMap[T]]
def allValues: IO[List[ResourceState[T]]]
def get(id: Id[T]): IO[Option[ResourceState[T]]]
def getActive(id: Id[T]): IO[Option[T]]

Inherited methods

def ids: Stream[IO, Id[T]]
Inherited from:
ReconcileSourceBase
def withActiveResourceTrigger[S](mirror: ResourceMirror[IO, S])(extractIds: S => IO[List[Id[T]]])(implicit io: Concurrent[IO]): ReconcileSource[IO, T]
Inherited from:
ReconcileSource
def withExternalTrigger(triggers: Stream[IO, Id[T]])(implicit io: Concurrent[IO]): ReconcileSource[IO, T]
Inherited from:
ReconcileSource
def withIdTrigger[R](watcher: ReconcileSource[IO, R])(extractIds: Id[R] => IO[List[Id[T]]])(implicit concurrent: Concurrent[IO]): ReconcileSource[IO, T]
Inherited from:
ReconcileSource
def withResourceTrigger[R](mirror: ResourceMirror[IO, R])(extractIds: ResourceState[R] => IO[List[Id[T]]])(implicit io: Concurrent[IO]): ReconcileSource[IO, T]
Inherited from:
ReconcileSource