fetch
package fetch
- Alphabetic
- By Inheritance
- fetch
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class Ap [A, B](ff: Query[(A) ⇒ B], fa: Query[A]) extends Query[B] with Product with Serializable
-
final
case class
Async
[A](action: (Callback[A], Errback) ⇒ Unit, timeout: Duration) extends Query[A] with Product with Serializable
A query that can only be satisfied asynchronously.
A query that can only be satisfied asynchronously. *
- final case class Concurrent (queries: NonEmptyList[FetchQuery[Any, Any]]) extends FetchOp[InMemoryCache] with FetchRequest with Product with Serializable
-
trait
DataSource
[I, A] extends AnyRef
A
DataSource
is the recipe for fetching a certain identityI
, which yields results of typeA
. -
trait
DataSourceCache
extends AnyRef
A
Cache
trait so the users of the library can provide their own cache. - type DataSourceIdentity = (DataSourceName, Any)
- type DataSourceName = String
-
trait
Env
extends AnyRef
An environment that is passed along during the fetch rounds.
An environment that is passed along during the fetch rounds. It holds the cache and the list of rounds that have been executed.
- sealed trait ExecutionType extends Product with Serializable
- type Fetch[A] = Free[FetchOp, A]
-
case class
FetchEnv
(cache: DataSourceCache, rounds: Queue[Round] = Queue.empty) extends Env with Product with Serializable
A concrete implementation of
Env
used in the default Fetch interpreter. - trait FetchException extends Throwable with Product with Serializable
- type FetchInterpreter[M[_]] = AnyRef { type f[x] = cats.data.StateT[M,fetch.FetchEnv,x] }
- trait FetchInterpreters extends AnyRef
- final case class FetchMany [I, A](ids: NonEmptyList[I], ds: DataSource[I, A]) extends FetchOp[List[A]] with FetchQuery[I, A] with Product with Serializable
- trait FetchMonadError [M[_]] extends MonadError[M, FetchException]
- final case class FetchOne [I, A](id: I, ds: DataSource[I, A]) extends FetchOp[A] with FetchQuery[I, A] with Product with Serializable
-
sealed abstract
class
FetchOp
[A] extends Product with Serializable
Primitive operations in the Fetch Free monad.
- sealed trait FetchQuery [I, A] extends FetchRequest
-
sealed
trait
FetchRequest
extends Product with Serializable
Requests in Fetch Free monad.
-
case class
InMemoryCache
(state: Map[DataSourceIdentity, Any]) extends DataSourceCache with Product with Serializable
A cache that stores its elements in memory.
- final case class Join [A, B](fl: Fetch[A], fr: Fetch[B]) extends FetchOp[(A, B)] with Product with Serializable
- case class MissingIdentities (env: Env, missing: Map[DataSourceName, List[Any]]) extends Throwable with FetchException with Product with Serializable
- case class NotFound (env: Env, request: FetchOne[_, _]) extends Throwable with FetchException with Product with Serializable
- sealed trait Query [A] extends Product with Serializable
-
case class
Round
(cache: DataSourceCache, request: FetchRequest, response: Any, start: Long, end: Long) extends Product with Serializable
A data structure that holds information about a fetch round.
-
final
case class
Sync
[A](action: Eval[A]) extends Query[A] with Product with Serializable
A query that can be satisfied synchronously.
A query that can be satisfied synchronously. *
- final case class Thrown [A](err: Throwable) extends FetchOp[A] with Product with Serializable
- case class UnhandledException (env: Env, err: Throwable) extends Throwable with FetchException with Product with Serializable
Value Members
- implicit val fetchApplicative: Applicative[Fetch]
- object Fetch extends FetchInterpreters with Serializable
- object FetchMonadError extends Serializable
- object InMemoryCache extends Serializable
- object Parallel extends ExecutionType with Product with Serializable
- object Query extends Serializable
- object Sequential extends ExecutionType with Product with Serializable
- object implicits
- object syntax