Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ChainIndexIndexers = ChainIndexIndexers {
- _utxosIndexer :: State UtxoHandle
- utxosIndexer :: Iso' ChainIndexIndexers (State UtxoHandle)
- data ChainIndexIndexersMVar = ChainIndexIndexersMVar {
- _utxosIndexerMVar :: MVar (State UtxoHandle)
- boxChainIndexIndexers :: ChainIndexIndexers -> IO ChainIndexIndexersMVar
- utxosIndexerMVar :: Iso' ChainIndexIndexersMVar (MVar (State UtxoHandle))
- getChainIndexIndexers :: ChainIndexIndexersMVar -> IO ChainIndexIndexers
- putChainIndexIndexers :: ChainIndexIndexers -> ChainIndexIndexersMVar -> IO ()
- data MarconiEffect handle r where
- QueryIndexer :: StorableQuery handle -> MarconiEffect handle (StorableResult handle)
- queryIndexer :: forall handle. forall effs. Member (MarconiEffect handle) effs => StorableQuery handle -> Eff effs (StorableResult handle)
- handleMarconiQuery :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, StorableMonad handle ~ IO, HasPoint (StorableEvent handle) (StorablePoint handle), Ord (StorablePoint handle), Queryable handle) => Lens' ChainIndexIndexers (State handle) -> MarconiEffect handle ~> Eff effs
- getUtxoSetAtAddress :: forall effs. Member (MarconiEffect UtxoHandle) effs => PageQuery TxOutRef -> CardanoAddress -> Eff effs UtxosResponse
- getUtxoEvents :: [CardanoTx] -> ChainPoint -> StorableEvent UtxoHandle
- data RunRequirements = RunRequirements {
- trace :: !(Trace IO (PrettyObject ChainIndexLog))
- indexers :: !ChainIndexIndexersMVar
- runChainIndexEffects :: RunRequirements -> Eff '[ChainIndexQueryEffect, ChainIndexControlEffect] a -> IO (Either ChainIndexError a)
- handleControl :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, Member (Error ChainIndexError) effs) => ChainIndexControlEffect ~> Eff effs
- handleQuery :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, Member (Error ChainIndexError) effs) => ChainIndexQueryEffect ~> Eff effs
- handleChainIndexEffects :: (LastMember IO effs, Member (Reader ChainIndexIndexersMVar) effs) => Eff (ChainIndexQueryEffect ': (ChainIndexControlEffect ': effs)) a -> Eff effs (Either ChainIndexError a)
Documentation
data ChainIndexIndexers Source #
ChainIndexIndexers | |
|
utxosIndexer :: Iso' ChainIndexIndexers (State UtxoHandle) Source #
data ChainIndexIndexersMVar Source #
ChainIndexIndexersMVar | |
|
utxosIndexerMVar :: Iso' ChainIndexIndexersMVar (MVar (State UtxoHandle)) Source #
data MarconiEffect handle r where Source #
QueryIndexer :: StorableQuery handle -> MarconiEffect handle (StorableResult handle) |
queryIndexer :: forall handle. forall effs. Member (MarconiEffect handle) effs => StorableQuery handle -> Eff effs (StorableResult handle) Source #
handleMarconiQuery :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, StorableMonad handle ~ IO, HasPoint (StorableEvent handle) (StorablePoint handle), Ord (StorablePoint handle), Queryable handle) => Lens' ChainIndexIndexers (State handle) -> MarconiEffect handle ~> Eff effs Source #
getUtxoSetAtAddress :: forall effs. Member (MarconiEffect UtxoHandle) effs => PageQuery TxOutRef -> CardanoAddress -> Eff effs UtxosResponse Source #
:: [CardanoTx] | |
-> ChainPoint | |
-> StorableEvent UtxoHandle | UtxoEvents are stored in storage after conversion to UtxoRow |
data RunRequirements Source #
The required arguments to run the chain index effects.
RunRequirements | |
|
runChainIndexEffects :: RunRequirements -> Eff '[ChainIndexQueryEffect, ChainIndexControlEffect] a -> IO (Either ChainIndexError a) Source #
Run the chain index effects.
handleControl :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, Member (Error ChainIndexError) effs) => ChainIndexControlEffect ~> Eff effs Source #
handleQuery :: (LastMember IO effs, Member (State ChainIndexIndexers) effs, Member (Error ChainIndexError) effs) => ChainIndexQueryEffect ~> Eff effs Source #
handleChainIndexEffects :: (LastMember IO effs, Member (Reader ChainIndexIndexersMVar) effs) => Eff (ChainIndexQueryEffect ': (ChainIndexControlEffect ': effs)) a -> Eff effs (Either ChainIndexError a) Source #
Handle the chain index effects from the set of all effects.