Documentation ¶
Index ¶
- type PostgresStore
- func (s *PostgresStore) CommitBlock(ctx context.Context, block uint64) error
- func (s *PostgresStore) GetMissingBlocks(ctx context.Context, lowerBound uint64, upperBound uint64) (pgx.Rows, error)
- func (s *PostgresStore) GetSearchBounds(ctx context.Context, batchSize uint64, headCursor uint64, headBlockLag uint64) (uint64, uint64, error)
- func (s *PostgresStore) SetSearchLowerBound(ctx context.Context, 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(ctx context.Context, block uint64) error
func (*PostgresStore) GetMissingBlocks ¶
func (*PostgresStore) GetSearchBounds ¶
func (*PostgresStore) SetSearchLowerBound ¶
func (s *PostgresStore) SetSearchLowerBound(ctx context.Context, newLowerBound uint64) error
type PostgresStoreOpts ¶
type Store ¶
type Store[T any] interface { GetSearchBounds(ctx context.Context, batchSize uint64, headCursor uint64, headBlockLag uint64) (lowerBound uint64, upperBound uint64, err error) GetMissingBlocks(ctx context.Context, lowerBound uint64, upperBound uint64) (missingBlocksIterable T, err error) SetSearchLowerBound(ctx context.Context, newLowerBound uint64) (err error) CommitBlock(ctx context.Context, block uint64) (err error) }
Store defines all relevant get/set queries against the implemented storage backend.
func NewPostgresStore ¶
func NewPostgresStore(o PostgresStoreOpts) (Store[pgx.Rows], error)
Click to show internal directories.
Click to hide internal directories.