core.repositories

Members list

Packages

Type members

Classlikes

class FunctionalInMemoryReactionRepository[F[_]](state: Ref[F, Map[ReactionId, Reaction]])(implicit evidence$1: Sync[F]) extends ReactionRepository[F]

An in-memory implementation of ReactionRepository for testing and local use.

An in-memory implementation of ReactionRepository for testing and local use.

Type parameters

F

Effect type, such as IO or SyncIO.

Value parameters

state

A Ref encapsulating the mutable map of reactions.

Attributes

Source
InMemoryReactionRepository.scala
Supertypes
class Object
trait Matchable
class Any
class InMemoryMechanismRepository[F[_]](state: Ref[F, Map[MechanismId, Mechanism]])(implicit evidence$1: Sync[F]) extends MechanismRepository[F]

InMemoryMechanismRepository is analogous to a Haskell stateful data structure that holds a Map within a monadic context. This class abstracts over an effect type F, which can be seen as a Haskell monad that supports side effects and state management.

InMemoryMechanismRepository is analogous to a Haskell stateful data structure that holds a Map within a monadic context. This class abstracts over an effect type F, which can be seen as a Haskell monad that supports side effects and state management.

Type parameters

F

The abstract effect type, which could be likened to an effectful monad in Haskell (e.g., IO, StateT). type MechanismRepository m = StateT (Map MechanismId Mechanism) m

Value parameters

state

Ref[F, Map[MechanismId, Mechanism]]

  • Ref in Scala is similar to IORef or MVar in Haskell, representing mutable state within a monad.
  • Map[MechanismId, Mechanism] represents an immutable key-value data structure, comparable to Data.Map in Haskell.
  • F[_]: Sync constraint in Scala corresponds to a Haskell MonadIO constraint, enabling us to manage effects in a functional way.

Attributes

Source
InMemoryMechanismRepository.scala
Supertypes
class Object
trait Matchable
class Any
class Neo4jReactionRepository[F[_]](client: HttpClient[F])(implicit evidence$1: Sync[F]) extends ReactionRepository[F]

ADDITIONAL MODULE

ADDITIONAL MODULE

Neo4jReactionRepository provides a direct interface to the Chemist Pre-processor for managing reactions. This implementation bypasses any caching or additional service logic, directly interacting with the Neo4j-backed Chemist service through HTTP requests.

Value parameters

client

The HttpClient used to communicate with the Chemist service.

Attributes

Source
Neo4jReactionRepository.scala
Supertypes
class Object
trait Matchable
class Any