Documentation
¶
Index ¶
- type PostgresStore
- func (s *PostgresStore) CommitBlock(block uint64) error
- func (s *PostgresStore) GetMissingBlocks(lowerBound uint64, upperBound uint64) (pgx.Rows, error)
- func (s *PostgresStore) GetSearchBounds(batchSize uint64, headCursor uint64, headBlockLag uint64) (uint64, uint64, error)
- func (s *PostgresStore) SetSearchLowerBound(newLowerBound uint64) error
- type PostgresStoreOpts
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStore ¶
type PostgresStore struct {
// contains filtered or unexported fields
}
func (*PostgresStore) CommitBlock ¶
func (s *PostgresStore) CommitBlock(block uint64) error
func (*PostgresStore) GetMissingBlocks ¶
func (s *PostgresStore) GetMissingBlocks(lowerBound uint64, upperBound uint64) (pgx.Rows, error)
func (*PostgresStore) GetSearchBounds ¶
func (*PostgresStore) SetSearchLowerBound ¶
func (s *PostgresStore) SetSearchLowerBound(newLowerBound uint64) error
type PostgresStoreOpts ¶
type Store ¶
type Store[T any] interface { GetSearchBounds(batchSize uint64, headCursor uint64, headBlockLag uint64) (lowerBound uint64, upperBound uint64, err error) GetMissingBlocks(lowerBound uint64, upperBound uint64) (missingBlocksIterable T, err error) SetSearchLowerBound(newLowerBound uint64) (err error) CommitBlock(block uint64) (err error) }
Store defines indexer get and set queries. GetMissingBlocks returns a generic iterable.
func NewPostgresStore ¶
func NewPostgresStore(o PostgresStoreOpts) (Store[pgx.Rows], error)
Click to show internal directories.
Click to hide internal directories.