| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Marconi.Cardano.Indexers.BlockInfo
Description
An Indexer that stores BlockInfo
Synopsis
- data BlockInfo = BlockInfo !BlockNo !Word64 !EpochNo
- blockNo :: Lens' BlockInfo BlockNo
- timestamp :: Lens' BlockInfo Word64
- epochNo :: Lens' BlockInfo EpochNo
- type BlockInfoIndexer = SQLiteIndexer BlockInfo
- mkBlockInfoIndexer :: (MonadIO m, MonadError IndexerError m) => SQLiteDBLocation -> m (SQLiteIndexer BlockInfo)
- blockInfoWorker :: (MonadIO n, MonadError IndexerError n, MonadIO m) => StandardWorkerConfig m input BlockInfo -> SQLiteDBLocation -> n (StandardWorker m input BlockInfo SQLiteIndexer)
- blockInfoBuilder :: (MonadIO n, MonadError IndexerError n) => SecurityParam -> CatchupConfig -> Trace IO Text -> FilePath -> n (StandardWorker IO BlockEvent BlockInfo SQLiteIndexer)
- type StandardBlockInfoIndexer m = StandardSQLiteIndexer m BlockInfo
- catchupConfigEventHook :: Text -> Trace IO Text -> FilePath -> CatchupEvent -> IO ()
- fromBlockEratoBlockInfo :: Block era -> EpochNo -> POSIXTime -> BlockInfo
- extractBlockInfo :: BlockEvent -> BlockInfo
- newtype BlockInfoBySlotNoQuery event = BlockInfoBySlotNoQuery SlotNo
- dbName :: String
Event
Instances
Indexer and worker
type BlockInfoIndexer = SQLiteIndexer BlockInfo #
A raw SQLite indexer for BlackInfo
Arguments
| :: (MonadIO m, MonadError IndexerError m) | |
| => SQLiteDBLocation | SQL connection to database |
| -> m (SQLiteIndexer BlockInfo) |
A smart constructor for BlockInfoIndexer
Arguments
| :: (MonadIO n, MonadError IndexerError n, MonadIO m) | |
| => StandardWorkerConfig m input BlockInfo | General indexer configuration |
| -> SQLiteDBLocation | SQLite database location |
| -> n (StandardWorker m input BlockInfo SQLiteIndexer) |
Create a worker for BlockInfoIndexer with catchup
blockInfoBuilder :: (MonadIO n, MonadError IndexerError n) => SecurityParam -> CatchupConfig -> Trace IO Text -> FilePath -> n (StandardWorker IO BlockEvent BlockInfo SQLiteIndexer) #
Convenience wrapper around blockInfoWorker with some defaults for
creating StandardWorkerConfig, including a preprocessor.
type StandardBlockInfoIndexer m = StandardSQLiteIndexer m BlockInfo #
A SQLite BlockInfo indexer with Catchup
catchupConfigEventHook :: Text -> Trace IO Text -> FilePath -> CatchupEvent -> IO () #
Extractor
fromBlockEratoBlockInfo :: Block era -> EpochNo -> POSIXTime -> BlockInfo #
extractBlockInfo :: BlockEvent -> BlockInfo #
Query
newtype BlockInfoBySlotNoQuery event #
Constructors
| BlockInfoBySlotNoQuery SlotNo |
Instances
| (MonadIO m, MonadError (QueryError (BlockInfoBySlotNoQuery BlockInfo)) m) => Queryable m BlockInfo (BlockInfoBySlotNoQuery BlockInfo) SQLiteIndexer # | |
Defined in Marconi.Cardano.Indexers.BlockInfo Methods query :: Point BlockInfo -> BlockInfoBySlotNoQuery BlockInfo -> SQLiteIndexer BlockInfo -> m (Result (BlockInfoBySlotNoQuery BlockInfo)) Source # queryLatest :: BlockInfoBySlotNoQuery BlockInfo -> SQLiteIndexer BlockInfo -> m (Result (BlockInfoBySlotNoQuery BlockInfo)) Source # | |
| type Result (BlockInfoBySlotNoQuery event) # | |
Defined in Marconi.Cardano.Indexers.BlockInfo | |