| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Marconi.Indexers
Synopsis
- getDatums :: BlockInMode CardanoMode -> [(SlotNo, (Hash ScriptData, ScriptData))]
- scriptDataFromCardanoTxBody :: TxBody era -> Map (Hash ScriptData) ScriptData
- data Coordinator = Coordinator {}
- initialCoordinator :: Int -> IO Coordinator
- type Worker = Coordinator -> FilePath -> IO [StorablePoint ScriptTxHandle]
- datumWorker :: Worker
- isInTargetTxOut :: TargetAddresses -> TxOut CtxTx era -> Bool
- utxoWorker :: (UtxoIndex -> IO UtxoIndex) -> Maybe TargetAddresses -> Worker
- scriptTxWorker_ :: (StorableEvent ScriptTxHandle -> IO [()]) -> Depth -> Coordinator -> TChan (ChainSyncEvent (BlockInMode CardanoMode)) -> FilePath -> IO (IO (), MVar ScriptTxIndexer)
- scriptTxWorker :: (StorableEvent ScriptTxHandle -> IO [()]) -> Worker
- newtype UtxoQueryTMVar = UtxoQueryTMVar {}
- filterIndexers :: Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe TargetAddresses -> [(Worker, FilePath)]
- startIndexers :: [(Worker, FilePath)] -> IO ([ChainPoint], Coordinator)
- mkIndexerStream :: Coordinator -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r -> IO ()
Documentation
getDatums :: BlockInMode CardanoMode -> [(SlotNo, (Hash ScriptData, ScriptData))] Source #
scriptDataFromCardanoTxBody :: TxBody era -> Map (Hash ScriptData) ScriptData Source #
data Coordinator Source #
The way we synchronise channel consumption is by waiting on a QSemN for each of the spawn indexers to finish processing the current event.
The channel is used to transmit the next event to the listening indexers. Note that even if the channel is unbound it will actually only ever hold one event because it will be blocked until the processing of the event finishes on all indexers.
The indexer count is where we save the number of running indexers so we know for how many we are waiting.
Constructors
| Coordinator | |
Fields
| |
initialCoordinator :: Int -> IO Coordinator Source #
type Worker = Coordinator -> FilePath -> IO [StorablePoint ScriptTxHandle] Source #
datumWorker :: Worker Source #
Arguments
| :: TargetAddresses | non empty list of target address |
| -> TxOut CtxTx era | a cardano transaction out that contains an address |
| -> Bool |
does the transaction contain a targetAddress
scriptTxWorker_ :: (StorableEvent ScriptTxHandle -> IO [()]) -> Depth -> Coordinator -> TChan (ChainSyncEvent (BlockInMode CardanoMode)) -> FilePath -> IO (IO (), MVar ScriptTxIndexer) Source #
scriptTxWorker :: (StorableEvent ScriptTxHandle -> IO [()]) -> Worker Source #
newtype UtxoQueryTMVar Source #
Constructors
| UtxoQueryTMVar | |
Fields
| |
filterIndexers :: Maybe FilePath -> Maybe FilePath -> Maybe FilePath -> Maybe TargetAddresses -> [(Worker, FilePath)] Source #
startIndexers :: [(Worker, FilePath)] -> IO ([ChainPoint], Coordinator) Source #
mkIndexerStream :: Coordinator -> Stream (Of (ChainSyncEvent (BlockInMode CardanoMode))) IO r -> IO () Source #